34

I created a new project in Android Studio 0.8 in order to start integrating Android Wear into one of my apps. I create a new project and include the Wear form factor, but when I try to sync I get:

Error:Could not find any version that matches com.google.android.support:wearable:+. Required by: win_control:wear:unspecified

EDIT: I played around with Gradle a bit, and now I get these errors:

Error:Failed to find: com.google.android.gms:play-services-wearable:+ Open in Project Structure dialog
Open File

Error:Failed to find: com.google.android.support:wearable:+ Open in Project Structure dialog
Open File

GabrielOshiro
  • 7,986
  • 4
  • 45
  • 57
Eliezer
  • 7,209
  • 12
  • 56
  • 103

6 Answers6

40

Had the same problem. Open up your Android SDK manager, go to tools -> manage add on sites, and add your own repo:

https://dl-ssl.google.com/android/repository/addon-play-services-5.xml

I finally found these helpful guides. There are lots of broken links and bad info floating around, but these should work:

http://developer.android.com/preview/google-play-services-wear.html

then,

http://developer.android.com/training/wearables/apps/creating.html

Also, double check your android sdk manager to make sure you have all the latest updates, as well as the android support repository/libraries!

nickjm
  • 412
  • 1
  • 10
  • 21
  • 1
    Thanks for the links. That second link (google-play-services-wear) has the instructions I was missing). Gonna try those out now and see what happens. – Eliezer Jun 27 '14 at 04:40
  • 4
    On Mac: If, when you open the SDK Manager, you don't see **Packages** and **Tools** in the menu bar switch out and back into the SDK Manager to force the OS to switch to that App. This will show the proper menubar items. I was having the hardest time figuring out why I was missing it. – adam8810 Jun 28 '14 at 16:02
  • Android wear app is not found on Google play :( is there another way ? – jaumard Jun 29 '14 at 15:42
  • 1
    @jaumard yeah that can happen - make sure you follow the links in the guide I posted (second link above). You need to sign up as a tester for Google Play Services 5.0, Google Now, and Android Wear, and update them all in that order. – nickjm Jun 29 '14 at 17:48
  • It's ok it's working on my phone (I was testing steps from my computer). Thanks ! – jaumard Jun 29 '14 at 18:31
  • second link is now broken... perhaps because Wear is now released rather than preview – barkside Jul 14 '14 at 14:53
  • Still getting this problem. The first url on the add on site does not show any packages, while the second url is dead. Still having this bug. :( – Andres C Jul 16 '14 at 14:17
  • Exactly what components should be installed ? I do have : Android SDK tools, platform tools, build tools, 4.4W sdk platform, 4.4w system image, Android support repository, Andorid support library, Google Play services. And I still have OP's issue – Taiko Jul 24 '14 at 06:47
  • I've installed: Android Support repository, Android Support Library, Google Play services, Google Repository, plus already had (latest version of Android SDK tools, platform tools and build tools and the whole package of the API 20) and I got rid of the error, though I did not install package by package. – Thomas Oct 29 '14 at 15:25
10

All the suggestion here at SO are now outdated.

What you should do is make sure "Google Repository" is checked and installed in the SDK manager.

Ran
  • 1,089
  • 1
  • 12
  • 30
8

If all of these didn't work for you, check out the instructions at https://code.google.com/p/android/issues/detail?id=72454 For me, I was simply missing Google Repository from the extras section in the sdk manager

ekatz
  • 963
  • 3
  • 18
  • 38
  • 2
    Same here, am on a Mac. Just installing latest version of Google Repository solved the issue. +1 – voghDev Sep 28 '14 at 18:28
2

If the SDK manager doesn't find any updates for you, it helped for me to wipe the m2repository folder under ~/.android/extras/google/.

You can manually add the update site by using your favorite text editor on ~/.android/repositories.cfg, it should look like this:

### User Sources for Android SDK Manager
#Wed Jul 02 10:15:39 EDT 2014
count=1
src00=https\://dl-ssl.google.com/android/repository/addon-play-services-5.xml
Sveinung Kval Bakken
  • 3,715
  • 1
  • 24
  • 30
1

I found out that, as of Android Studio 0.8.1, the option "Manage Add-On Sites" is absent from the Tools menu. Just in case someone else can't find it either, here's how to get to it :

1/ Go to Tools > Android > SDK Manager.

2/ Then, once the SDK Manager is opened, in the top menu go to Tools > Manage Add-On Sites.

There you go, then you just apply what nickjm said (thanks for the tip btw, I was wondering what was going on with this error message !).

CyberDandy
  • 470
  • 6
  • 17
1

Adding the add on site did not work for me. In the android SDK, I simply opened up: Tools->Options...->Enable Preview Tools (Check it) Then it had an update for the wear stuff ... which I, of course, updated.

This allowed the library to be referenced by the IDE.