tools.jar seems to be not in Android Studio classpath on Windows 8

后端 未结 16 2738
长发绾君心
长发绾君心 2020-12-05 02:05

I installed Android Studio but it was giving me error that I need to install JDK but JDK was already installed. Then I realized it is asking to install 64bit version of JDK.

相关标签:
16条回答
  • 2020-12-05 02:20

    In my case I've installed newest Java version without uninstalling older version first. After I've uninstalled the older Java version this error was gone.

    Also make sure your JAVA_HOME system variable is set properly, e.g.: Variable Name: JAVA_HOME Variable Value: C:\Program Files\Java\jdk1.8.0_31\

    And finally, that you've installed proper version for your OS, x86 or x64.

    0 讨论(0)
  • 2020-12-05 02:25

    I had this same problem and was able to fix it after wasting about 3 hours:

    Just copy tools.jar from %JAVA_HOME%\lib to (Android Studio Root)\lib

    0 讨论(0)
  • 2020-12-05 02:27

    1) Just install JDK from here

    2) Change JAVA_HOME variable (e.g. C:\Program Files\Java\jdk1.8.0_112)

    0 讨论(0)
  • 2020-12-05 02:28

    First locate in your PC the route of your JDK (for instance: First locate in your PC the route of your JDK (for instance: C:\Program Files\Java\jdk1.8.0_11)

    then change the JAVA_HOME variable as follows:

    Right-click the My Computer icon on your desktop and select Properties Click the Advanced tab Click the Environment Variables button Under System Variables, click New or edit it if there already a path for it ( you should make sure that the path is jdk) Enter the variable name as JAVA_HOME Enter the variable value as the installation path for the Java Development Kit)

    0 讨论(0)
  • 2020-12-05 02:29

    I add a similar problem on Linux. In my case my JAVA_HOME env was pointing to the JRE HOME instead of the JDK HOME.

    On my linux system I had done:

    sabayon ~ # eselect java-vm list
    Available Java Virtual Machines:
    [1]   icedtea-bin-8 
    [2]   oracle-jdk-bin-1.8 
    [3]   oracle-jre-bin-1.8  system-vm
    
    sabayon ~ # eselect java-vm set system 2
    

    And then Android Studio started like a charm. Download and install the SDK.

    0 讨论(0)
  • 2020-12-05 02:32

    check your JAVA_HOME value!

    it should be like this

    E:\Program Files\Java\jdk1.8.0_25\jre

    0 讨论(0)
提交回复
热议问题