Tools.jar is not in Android Studio classpath

感情迁移 提交于 2019-11-30 16:27:32

问题


I tried installing Android Studio on a Samsung Chromebook Series 3 with an ARM processor, but I'm stuck with the Java. Any help would be appreciated.

Downloaded and extracted Android Studio
Downloaded and extracted Java 1.7.0_21 JDK ARM
Completed the below commands except the javaws commands as they error-ed out doesn't exist

tar xzvf ~/Downloads/jdk-7u21-linux-arm.tar.gz sudo mv jdk1.7.0_21/ /usr/lib/jvm/ 
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_21/bin/java 1 
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_21/bin/javac 1 sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_21/bin/javaws 1 
sudo update-alternatives --config java 
sudo update-alternatives --config javaws

I tried the JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21 command and it would still give me the error.


回答1:


Please check whether your system configuration is 32bit or 64bit and according to that download respective JDK and provide its path in JAVA_HOME




回答2:


No It's not in the studio. What you should do:

  • Change your JRE to use the JRE found inside your JDK
  • Add tools.jar that can be found in the JDK Libraries folder

That's it. It's a known issue, but they're working on it. But this is a workaround.




回答3:


Couple of things, you can check: 1. check jdk is in your path 2. from your command line, execute this command: java -version and see what it shows 3. and execute this command: javac -version If both command gives no error then try again otherwise fix those issue.btw, Do not forget to check your system configuration to make sure that it is 32bit or 64 bit



来源:https://stackoverflow.com/questions/16952990/tools-jar-is-not-in-android-studio-classpath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!