Problem in adding SDK location for android studio in Ubuntu

I have tried to install the android studio by this site instruction and below commands, the android studio show warning sigh and don't add this path to the android studio:

sudo apt install android-sdk
sudo apt install android-studio

and added the below content to ~/bashrc file :

# Export the Android SDK path
export ANDROID_HOME=/usr/lib/android-sdk
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
# Fixes sdkmanager error with java versions higher than java 8
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'

and tried to add the SDK, but I get the below error by manually adding the SDK files locations:

enter image description here

Also, by installing the SKD downloading the SDK file from this address and unzip it and give the location don't fixed as you can see at above photo. also, it can not recognize the sdkmanager as you can see below:

so-pc@sopc-Lenovo-ideapad-310-15IKB:~$ sdkmanager --list
sdkmanager: command not found
$ sudo /usr/lib/android-sdk/tools/bin/sdkmanager --update
sudo: /usr/lib/android-sdk/tools/bin/sdkmanager: command not found

I guess It must remove the android studio and install it again, but I asked here to have some comment about the reason or. also, I have added the path to ~/bashrc file and restarted the PC, but it doesn't solve.

Update 1:

Also in the downloaded sdk folder form this link, by running the sdkmanager it give the below error:

enter image description here

so-pc@sopc-Lenovo-ideapad-310-15IKB:~/Downloads/Trash/sdk-tools-linux-4333796/tools/bin$ ./sdkmanager --update
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found

Thanks.

1

1 Answer

I see overcomplication in both question and method.

You have to use simpler method which involves Ubuntu Make, install package from it

sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake android

the last command will install Android Studio to your home folder with corresponding shortcuts.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like