Home > OS >  Ubuntu (WSL): How should I be setting these paths for Android Studio?
Ubuntu (WSL): How should I be setting these paths for Android Studio?

Time:07-11

I recently installed Android Studio on Ubuntu (WSL) for my Meteor project but it installed to /opt/android-studio. I see that the SDK is installed to /root/Android/Sdk. I've added it to the ANDROID_SDK_ROOT env variable but it says its a non existent path.

How should I be setting these paths? This is the output I'm getting:

Status of the individual requirements:        
    
✓ Java JDK                                    
✗ Android SDK: 'ANDROID_SDK_ROOT' environment variable is set to non-existent path:
        /root/Android/Sdk
        Try update it manually to point to valid SDK directory.
✗ Android target: Command failed with EACCES: avdmanager list target
        spawn avdmanager EACCES
✓ Gradle                                      

I have set the JAVA_HOME path to:

/usr/lib/jvm/java-11-openjdk-amd64

CodePudding user response:

JAVA_HOME should be something like /usr/lib/jvm/java-11-openjdk-amd64

There are no sdks because you need to populate using or android studio or something like the sdkman command line utility

CodePudding user response:

Moving the Android directory to /etc solved it:

sudo su
mv /root/Android /etc
  • Related