Android Studio error after ./studio.sh

前端 未结 12 1256
名媛妹妹
名媛妹妹 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:02

    the solution for me was to modify studio.sh and add JAVA_HOME as a variable:

    # ---------------------------------------------------------------------
    # Locate a JDK installation directory which will be used to run the IDE.
    # Try (in order): STUDIO_JDK, ../jre, JDK_HOME, JAVA_HOME, "java" in PATH.
    # -------------------------------------------------------------------
    
         JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-i386/
    
    if [ -n "$STUDIO_JDK" -a -x "$STUDIO_JDK/bin/java" ]; then (etc..)
    

提交回复
热议问题