Android的工作室需要JDK 7为Android-L MAC [英] Android Studio needs JDK 7 for Android-L mac
问题描述
我是想看看如何我的应用程序看起来在材料的设计,我想使用新的卡库。 我的问题是,它给了我在我的摇篮文件这个错误,我需要解决这个问题。
I was trying to look how my app looks in material design and I would like to use the new cards lib. My Problem is, that it's giving me this error within my gradle file and I need to fix that.
Error:compileSdkVersion android-L requires compiling with JDK 7
我下载的jdk-7u60-的MacOSX-x64.dmg
并安装它。 Java的版本
的终端是显示我的1.7安装:
I downloaded jdk-7u60-macosx-x64.dmg
and installed it. java -version
in Terminal is showing me that 1.7 is installed:
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
以及
ls -l `which java`
是给我:
/usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
... /电流/...
不具有 ... /家庭
。我发现 ... /家庭
这里:
.../current/...
doesn't have a .../home
. I found the .../home
here:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
和设置的路径,在Android的工作室在JDK位置的SDK位置preferences。但它不工作 - 它似乎仍然无法找到JDK 7
And set the path to the "SDK location" Preferences in Android Studio under "JDK location". But it's not working -- it seems that it still can't find JDK 7.
我使用的是Mac OSX 10.9.3和Android工作室(测试版)0.8.1。
I'm using Mac OSX 10.9.3 and Android Studio (Beta) 0.8.1.
推荐答案
目录设置为:
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
在JDK的设置解决了我的问题。我有同样的问题起步了。希望这有助于!
Setting the directory to:
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
in JDK settings solved my issue. I had the same problem getting started up. Hope this helps!
这篇关于Android的工作室需要JDK 7为Android-L MAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!