#Android failed to start

17 messages · Page 1 of 1 (latest)

plain willow
#

Hello everyone,

I'm facing an issue when trying to launch pnpm tauri android dev. Here's a brief overview of what I've done so far:

  1. Successfully set up everything using pnpm tauri android init.
  2. Installed Android Studio via the JetBrains Toolbox.
  3. Set up the following environment variables:
    • ANDROID_HOME=/home/*user*/Android/Sdk
    • NDK_HOME=/home/*user*/Android/Sdk/ndk/27.0.11902837

However, when I try to launch from the package.json file, I encounter this error:

Error: Have you installed the Android SDK? The `ANDROID_HOME` environment variable is set, but doesn't point to an existing directory.

Additionally, when I try to run the command from the console without root privileges, nothing happens, and it seems to result in an infinite loading state.

Any advice or guidance on how to resolve this issue would be greatly appreciated. Thanks in advance!

real crag
#

How exactly did you set the environment variables?

#

Also:

However, when I try to launch from the package.json file,
Do you mean you start it somehow from inside vscode? Can you try running pnpm tauri android dev in a "normal" terminal outside of vscode?

plain willow
#

Clion

#

export ANDROID_HOME="$HOME/Android/Sdk"
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"

real crag
#

Okay, same thing then. Maybe clion doesn't see your env vars.

plain willow
#

When I try it on another terminal, it's the same thing

real crag
#

If you pasted the export commands into a terminal it will only be applied to that terminal session and not carry over to new terminal windows.

plain willow
#

and then i do sudo nano /home/pac/.bashrc

#

I think there's a problem with 1 configuring environment variables and 2 permissions, despite the fact that I've changed them.

#

sudo chmod -R 755 /home/pac/Android/Sdk

keen trellis
#

bro did chatgpt make this

plain willow
#

LMAOOO

#

for real i love it lmao

#

HOP

#

edited