So I've been learning android on eclipse this summer but decided to try out Android Studio along with the new Android-L release. 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. I downloaded jdk 7 and double-checked my skd manager to make sure I had all the updated tools. Everything looks good to me but I can't seem to get these errors to go. Here is a screenshot:
-
1Yesterday it's relese and u started it! Good – CoronaPintu Jun 27 '14 at 05:19
-
haha well i'm attempting to, can't even get past building the project. somewhat discouraging. – Joe Jun 27 '14 at 05:33
-
possible duplicate of [Android Wear Project Gradle Sync Fails](http://stackoverflow.com/questions/24441321/android-wear-project-gradle-sync-fails) – Scott Barta Jun 27 '14 at 14:35
-
I tried that but adding the repo didn't seem to change anything – Joe Jun 27 '14 at 15:20
2 Answers
For the last one, try download JDK 7 from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and run:
/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.

- 7,009
- 1
- 58
- 44
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:
For Android Studios version 0.8.0 Tools > Manage Add-on Sites > User Defined Sites.
For Android Studios Verison 0.8.1 Android SDK Manager > Tools > Manage Add-on Sites > User Defined Sites.
Add the site https://dl-ssl.google.com/android/repository/addon-play-services-5.xml
Then make sure you have the latest Google Play Services (18)
For the JDK issue I'm vaguely remember getting the same thing months ago and fixed it by downloading JDK 7.

- 413
- 2
- 11
-
Thanks, I updated to 8.1 and did that and it fixed it. I'm still having problems with the jdk 7 thing though. I'm downloading and installing Mac OS X x64 version from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html . is there something I have to do after updating to set the changes in android studio? – Joe Jun 29 '14 at 17:22
-
I just noticed the jdk settings in android studio are still linked to 1.6, Am I not installing it right because I can't find where 1.7 is. – Joe Jun 29 '14 at 17:26
-
Nevermind, I got it working. I just had to set the jdk directory to the new one. Took me a bit to find it. thanks for the help. – Joe Jun 29 '14 at 18:22