错误运行Android工作室 [英] Error to run Android Studio
问题描述
我已经安装了Android的工作室,我跟描述的所有步骤这里
I have installed Android Studio and I followed all steps described here
但是,当我开始 studio.sh
我得到这个消息的错误:
But when I start studio.sh
I got an error with this message:
的tools.jar'不是Android Studio中的类路径。请确保JAVA_HOME指向JDK,而不是JRE
'tools.jar' is not in Android Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE
在这里任何人都可以帮我这个?
Can anyone here help me with this?
推荐答案
检查是否正确安装你的Java JDK
Check if your Java JDK is installed correctly
dpkg --list | grep -i jdk
如果没有,请安装JDK
If not, install JDK
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-jdk7-installer
安装后,您必须启用JDK
After the installation you have to enable the jdk
update-alternatives --display java
检查是否Ubuntu使用的Java JDK 7
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
最后,添加JAVA_HOME环境变量
Finally, add JAVA_HOME to the environment variable
修改的/ etc /环境
并添加 JAVA_HOME = / usr / lib目录/ JVM / Java的7甲骨文
到该文件的末尾
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
您便要重新启动,你可以从与终端做到这一点:
You will then have to reboot, you can do this from the terminal with:
sudo reboot
如果你要删除的JDK
In case you want to remove the JDK
sudo apt-get remove oracle-jdk7-installer
这篇关于错误运行Android工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!