Android Wear Project Gradle Sync Fails

前端 未结 6 2025
[愿得一人]
[愿得一人] 2020-12-23 20:57

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 wh

相关标签:
6条回答
  • 2020-12-23 21:06

    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.

    0 讨论(0)
  • 2020-12-23 21:16

    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
    
    0 讨论(0)
  • 2020-12-23 21:19

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

    0 讨论(0)
  • 2020-12-23 21:20

    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.

    0 讨论(0)
  • 2020-12-23 21:22

    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

    0 讨论(0)
  • 2020-12-23 21:23

    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!

    0 讨论(0)
提交回复
热议问题