Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Wear Project Gradle Sync Fails

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

like image 895
Eliezer Avatar asked Jun 26 '14 22:06

Eliezer


People also ask

Why is gradle sync failing?

Missing Files: There is a chance of Gradle files getting misplaced. This can be solved by re-installing the required files. Using the Proxy Servers: There was an issue with the syncing of the Gradle when Proxy Servers were turned on. Disabling it can help.

How do I sync gradle with Android project?

Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.


1 Answers

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!

like image 121
nickjm Avatar answered Oct 07 '22 15:10

nickjm