Android Studio 'tools.jar' file is not present in classpath

前端 未结 11 2008
盖世英雄少女心
盖世英雄少女心 2020-12-07 13:49

I downloaded the current version of Android Studio (latest as of 4th July 2013) I also downloaded the JDK version 7u25.

However, it displays error after startup: Ple

11条回答
  •  一生所求
    2020-12-07 14:30

    Check if java JDK is installed correctly

    dpkg --list | grep -i jdk
    

    if not install JDK

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update && sudo apt-get install oracle-jdk7-installer
    

    After the installation you have enable the jdk

    update-alternatives --display java
    

    Check if Ubuntu uses Java JDK 7

    java -version
    

    If all went right the answer should be something like this:

    java version “1.7.0_25″
    Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
    

    Check what compiler is used

    javac -version
    

    It should show something like this

    javac 1.7.0_25
    

    Add JAVA_HOME to environment variable

    Edit /etc/environment and add JAVA_HOME=/usr/lib/jvm/java-7-oracle to the end of the file

    sudo nano /etc/environment
    

    Append to the end of the file

    JAVA_HOME=/usr/lib/jvm/java-7-oracle
    

    Log in and out (or reboot) for the changes to take effect.

    If you want to remove oracle JDK

    sudo apt-get remove oracle-jdk7-installer
    

提交回复
热议问题