Android Wear Project Gradle Sync Fails

£可爱£侵袭症+ 提交于 2019-11-29 21:22:04

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!

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.

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

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

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 !).

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!