./studio.sh 之后的 Android Studio 错误 [英] Android Studio error after ./studio.sh
问题描述
在终端中的 ./studio.sh
之后,我收到此错误tools.jar 不在 android studio 类路径中请确保 JAVA_HOME
指向 JDK 而不是 JRE".
After ./studio.sh
in a terminal I get this error "tools.jar is not in android studio classpath Please ensure JAVA_HOME
points to JDK rather than JRE".
我谷歌了一下,每个人都这么说:您需要将环境变量设置为 JDK 路径而不是 JRE"
I Google it and this is what everybody says: "you need to set your environment variable to JDK path instead of JRE"
我试试这两个命令
export PATH=${JDK_HOME}:/etc/java-7-openjdk
export PATH=${JAVA_HOME}:/etc/java-7-openjdk
再次执行./studio.sh
,我得到同样的错误
And execute again ./studio.sh
and I get the same error
我的操作系统是 Linux Mint 14
推荐答案
我结合 Jerome 和 Jarod 的回答解决了这个问题:
I solved the problem combining Jerome's and Jarod's answer:
- 安装JDK --
sudo apt-get install openjdk-7-jdk
- 环境变量 --
sudo nano/etc/environment
添加以下行: JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386
- 重启,Android Studio 启动.(我还在主菜单中添加了一个指向 studio.sh 的链接).
我也刚刚发现 https://stackoverflow.com/a/17827697/2533809 这似乎有一个不错的写的,几乎一样的答案.
Also I just found https://stackoverflow.com/a/17827697/2533809 which seems to have a nice write-up, pretty much the same answer.
(我使用的是 Debian 7 Wheezy)
(I'm using Debian 7 Wheezy)
这篇关于./studio.sh 之后的 Android Studio 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!