Android Studio error after ./studio.sh

前端 未结 12 1252
名媛妹妹
名媛妹妹 2021-01-30 10:49

After ./studio.sh in a terminal I get this error \"tools.jar is not in android studio classpath Please ensure JAVA_HOME points to JDK rather than JRE\"

12条回答
  •  旧巷少年郎
    2021-01-30 11:12

    You must be sure that your jre and jdk works fine.

    Run

    $ sudo apt-get install default-jre
    

    and then...

    $ sudo apt-get install default-jdk
    

    to make sure you have your javac path run

    $ whereis javac
    

    It should return something like this:

    javac: /usr/bin/javac /usr/bin/X11/javac /usr/share/man/man1/javac.1.gz
    

    If it does not work, you can try change the JAVA_HOME in /etc/enviroment file

    Append JAVA_HOME="${/.../JVM_PATH}"

    For example:

    JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
    

    and then reload this file:

    $ source /etc/environment
    

    Source: link

提交回复
热议问题