I've got a clean Android project with Google Play services rev. 13 installed through the SDK manager, following these instructions.
我有一个干净的Android项目与谷歌播放服务转。 13通过SDK管理器安装,遵循这些说明。
My build.gradle
file is as follows:
我的build.gradle文件如下:
dependencies {
compile 'com.google.android.gms:play-services:4.0.30'
}
However, when I attempt to build this app, I get
但是,当我尝试构建这个应用程序时,我得到了
Gradle: A problem occurred configuring project ':Maple'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':Maple:_DebugCompile'.
> Could not find com.google.android.gms:play-services:4.0.30.
Required by:
MapleProject:Maple:unspecified
3 个解决方案
#1
91
Install the Google Repository in the SDK manager.
在SDK管理器中安装Google Repository。
#2
4
Even if you have installed Google Repository in SDK Manager, you might still see the same error.
即使您已在SDK Manager中安装了Google Repository,您仍可能会看到相同的错误。
Another possible solution is to downgrade your version.
另一种可能的解决方案是降级您的版本。
For example, instead of
例如,而不是
compile 'com.google.android.gms:play-services:11.2.0'
Do
做
compile 'com.google.android.gms:play-services:11.0.4'
Notice 11.2.0 is advertised in Google's Set up Google Play Services page but it does not work for me.
通知11.2.0在谷歌的设置谷歌播放服务页面上做广告,但它不适合我。
#3
-1
Are you testing on Avd (Emulator or device ?) If emulator please check below: I resolved this issue by creating a new avd with target version as : Google APIs(GoogleInc) API Level 18. (platform 4.3 google api required)
您是否在Avd(模拟器或设备?)上进行测试如果模拟器请检查以下内容:我通过创建一个目标版本的新avd解决了这个问题:Google API(GoogleInc)API级别18.(需要平台4.3 google api)
#1
91
Install the Google Repository in the SDK manager.
在SDK管理器中安装Google Repository。
#2
4
Even if you have installed Google Repository in SDK Manager, you might still see the same error.
即使您已在SDK Manager中安装了Google Repository,您仍可能会看到相同的错误。
Another possible solution is to downgrade your version.
另一种可能的解决方案是降级您的版本。
For example, instead of
例如,而不是
compile 'com.google.android.gms:play-services:11.2.0'
Do
做
compile 'com.google.android.gms:play-services:11.0.4'
Notice 11.2.0 is advertised in Google's Set up Google Play Services page but it does not work for me.
通知11.2.0在谷歌的设置谷歌播放服务页面上做广告,但它不适合我。
#3
-1
Are you testing on Avd (Emulator or device ?) If emulator please check below: I resolved this issue by creating a new avd with target version as : Google APIs(GoogleInc) API Level 18. (platform 4.3 google api required)
您是否在Avd(模拟器或设备?)上进行测试如果模拟器请检查以下内容:我通过创建一个目标版本的新avd解决了这个问题:Google API(GoogleInc)API级别18.(需要平台4.3 google api)