AndroidStudio报错:'tools.jar' seems to be not in studio classpath的解决办法
'tools.jar' seems to be not in studio classpath.
please ensure JAVA_HOME points to JDK rether than JRE.
解决办法:
解决办法:到http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
下载JDK得到jdk-8u101-linux-x64.tar.gz,解压
tar xzvf jdk-8u101-linux-x64.tar.gz
解压为jdk文件夹,然后
sudo mv jdk /usr/lib/jvm
(如果还没有jvm文件夹则mkdir /usr/lib/jvm/创建一个文件夹解决)。
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javaws
OK完成了,测试一下看看java是否安装成功:查java版本号出来是java8的就行:
java -version
返回:
java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)