I try to have the preview of my app with react native doing "npx expo start --tunnel".
I have a problem when i try to put "a" to have expo on android studio.
The problem was first with adb :
› Opening on Android...
Failed to resolve the Android SDK path. Default install location not found: /home/quentin/Android/sdk. Use ANDROID_HOME to set the Android SDK location.
Failed to resolve the Android SDK path. Default install location not found: /home/quentin/Android/sdk. Use ANDROID_HOME to set the Android SDK location.
Error: spawn adb ENOENT
I spend 3 hours to find a solution, impossible to solve it.
For info, I'm on windows, and I work on ubuntu. I try to edit my zshrc file doing that ;
nano ~/.zshrc
Add (try much more multiple way to write it ...)
export ANDROID_HOME="/mnt/c/Users/quent/AppData/Local/Android/Sdk"
export PATH="$ANDROID_HOME/platform-tools:$PATH"
- source ~/.zshrc
The android folder is located at : C:\Users\quent\AppData\Local\Android\Sdk, and adb is well present in the folder platform-tools
Then, I try to do
sudo apt-get install android-tools-adb
With this, the problem changes :
Logs for your project will appear below. Press Ctrl+C to exit.
› Opening on Android...
Failed to resolve the Android SDK path. Default install location not found: /home/quentin/Android/sdk. Use ANDROID_HOME to set the Android SDK location.
Failed to resolve the Android SDK path. Default install location not found: /home/quentin/Android/sdk. Use ANDROID_HOME to set the Android SDK location.
Failed to resolve the Android SDK path. Default install location not found: /home/quentin/Android/sdk. Use ANDROID_HOME to set the Android SDK location.
CommandError: No Android connected device found, and no emulators could be started automatically.
Please connect a device or create an emulator (https://docs.expo.dev/workflow/android-studio-emulator).
Then follow the instructions here to enable USB debugging:
https://developer.android.com/studio/run/device.html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory.
I don't know what to do to solve the problem.
Thank you
"For info, I'm on windows, and I work on ubuntu." What?
Are you using ubuntu or windows?