简体   繁体   English

在Android Studio上设置L

[英]Setting up L on Android Studio

So I've been learning android on eclipse this summer but decided to try out Android Studio along with the new Android-L release. 因此,今年夏天我一直在eclipse上学习android,但是决定尝试Android Studio和新的Android-L版本。 Right when I make a new project though, I get three errors. 但是,当我制作一个新项目时,我遇到了三个错误。 The first two are failed to find support:wearables and gms:play-service-wearable and then the third is about Android-L needing jdk 7 to compile. 前两个未能找到support:wearables和gms:play-service-wearable,然后第三个是关于Android-L需要jdk 7进行编译的。 I downloaded jdk 7 and double-checked my skd manager to make sure I had all the updated tools. 我下载了jdk 7并仔细检查了我的skd管理器,以确保我拥有所有更新的工具。 Everything looks good to me but I can't seem to get these errors to go. 一切对我来说看起来不错,但我似乎无法解决这些错误。 Here is a screenshot: 这是屏幕截图: 在此处输入图片说明

For the last one, try download JDK 7 from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and run: 对于最后一个,请尝试从http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html下载JDK 7并运行:

/usr/libexec/java_home -v 1.7 / usr / libexec / java_home -v 1.7

You should get something like /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home, instead of /System/Library/... So just change JDK path to the new one. 您应该得到/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home之类的东西,而不是/ System / Library / ...,因此只需将JDK路径更改为新路径即可。

For the first two issues I just ran into this and fixed it with the help from https://code.google.com/p/android/issues/detail?id=72454 : 对于前两个问题,我只是遇到了这个问题,并在https://code.google.com/p/android/issues/detail?id=72454的帮助下进行了修复:

For Android Studios version 0.8.0 Tools > Manage Add-on Sites > User Defined Sites. 对于Android Studios 0.8.0版,工具>管理附加站点>用户定义的站点。

For Android Studios Verison 0.8.1 Android SDK Manager > Tools > Manage Add-on Sites > User Defined Sites. 对于Android Studio Verison 0.8.1,Android SDK Manager>工具>管理附加站点>用户定义的站点。

Add the site https://dl-ssl.google.com/android/repository/addon-play-services-5.xml 添加网站https://dl-ssl.google.com/android/repository/addon-play-services-5.xml

Then make sure you have the latest Google Play Services (18) 然后确保您拥有最新的Google Play服务(18)

For the JDK issue I'm vaguely remember getting the same thing months ago and fixed it by downloading JDK 7. 对于JDK问题,我隐约记得几个月前得到了同样的东西,并通过下载JDK 7对其进行了修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM