Failed to resolve the Android SDK path.

My setup
Windows 11
Ubuntu on WSL2 version "22.04.5 LTS
Android Studio - Flamingo

I am trying to use Android Studio emulators but when running npx expo start --android , I get this error:

Failed to resolve the Android SDK path.
Default install location not found: /my-wsl-filepath.
Use ANDROID_HOME to set the Android SDK location.

I believe the issue lies in my inability to change this SDK location to what is expected:

When I do change the SDK location (currently in Windows C drive) to the required default install location, it just defaults back to the same Windows file path after I click save.

I have had no luck in linking Android Studio to my VS Code projects. I’m guessing it is because VS Code, Android Studio are installed in Windows, but Ubuntu and project files are in WSL?

Please help!
Thank you for your time!

Have you tried adding the ANDROID_HOME env variable in Windows with the path C:\Users.…etc…?
What are you using WSL for since the Android emulator is on Windows?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.