i am trying to install android studio in ubuntu, but when i execute the studio.sh, i get the following error:

Unrecognized VM option 'MaxPermSize=350m'
Error: Could not create the Java Virtual Machine.

i have java and jdk installed, my JAVA_HOME: /usr/lib/jvm/jdk1.8.0_60/bin/

java -version output:

java version "1.9.0-ea" Java(TM) SE Runtime Environment (build 1.9.0-ea-b81) Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b81, mixed mode)

  • Which Android Studio? Eclipse or IntelliJ?
    – A.B.
    Oct 10, 2015 at 11:11
  • Edit your question and add the output of java -version
    – A.B.
    Oct 10, 2015 at 11:14

3 Answers 3


You are using Java 9 and not Java 8 how your JAVA_HOME will make you credible. The option was abolished with Java 8 and even ignored at this time. With Java 9 is no longer the case, the start is aborted. Therefore use Java 8 via

sudo update-alternatives --config java

and/or remove the entries MaxPermSize=350m in the files




Note, I have Android Studio installed in /opt

  • The first part of the answer didn't work, I only have one Java version installed (OpenJDK 9): There is only one alternative in link group java. [...] Nothing to configure..
    – IQAndreas
    Aug 19, 2016 at 19:55

Both java versions that you have listed are different.


sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Then on terminal go to the folder where you have extracted Android Studio folder and then run the following commands:

cd android-studio/bin
  • This worked on Ubuntu 16.10. Thank you!
    – orschiro
    Feb 22, 2017 at 20:28

i solved the problem changing the JAVA_HOME value to:


and i added it to /etc/environment file.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.