为Wear App构建gradle失败

时间:2014-06-27 14:12:44

标签: android android-studio android-gradle wear-os

我尝试在Android Studio中创建Android Wear项目。它似乎无法构建gradle文件,我得到的是:

Error:A problem occurred configuring project ':wear'.
> Could not resolve all dependencies for configuration ':wear:_debugCompile'.
> Could not find any version that matches com.google.android.support:wearable:+.
 Required by:
     Browser:wear:unspecified
> Could not find any version that matches com.google.android.gms:play-services-wearable:+.
 Required by:
     Browser:wear:unspecified

有什么建议吗?

3 个答案:

答案 0 :(得分:23)

这是一个已知问题。希望它能在接下来的日子里得到解决。

现在gradle应该能够解决依赖关系并下载缺少的模块,编译应该完成。

答案 1 :(得分:3)

如果所有这些都不适合您,请查看https://code.google.com/p/android/issues/detail?id=72454上的说明 对我来说,我只是从sdk管理器的附加部分中删除了Google Repository。

https://dl-ssl.google.com/android/repository/addon-play-services-5.xml添加回购,然后确保您已安装Google Repository。 它应该在sdk manager的附加部分提供

答案 2 :(得分:0)

最近在Ubuntu 14.10中安装AndroidStudio 0.8.9后出现了同样的问题。解决方案是转到SDK Manager并安装Google Play服务和Google Repository。它们似乎默认不安装。