[英]Why i can't get a dependency on the Google Play Services library?
I know that it has been asked hunderds of times, but I really can't find a solution for my issue. 我知道这曾被问过很多次,但我确实找不到解决我问题的方法。
I have this build file: 我有这个构建文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.gelasoft.gatanki"
minSdkVersion 14
targetSdkVersion 20
versionCode 2
versionName "1.1"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.android.support:support-v4:20.0.0'
compile 'com.google.android.gms:play-services:0.0.+'
}
Às you can see I'm trying to compile com.google.android.gms:play-services:0.0.+
您可以看到我正在尝试编译
com.google.android.gms:play-services:0.0.+
But I;m getting some scary errors that I really can not manage. 但是我遇到了一些我无法解决的可怕错误。 I have updated everything and the issue is still there.
我已经更新了所有内容,问题仍然存在。
Here the errors are: 这里的错误是:
When I'm trying to sync the project with gradle it says: 当我尝试使用gradle同步项目时,它说:
Error:Failed to find: com.google.android.gms:play-services:0.0.+
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile">Open File</a><br><a href="open.dependency.in.project.structure">Open in Project Structure dialog</a>
and in my manifest where I'm trying this it can not be resolved as well: 在我尝试的清单中,也无法解决:
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
I know that I'm missing a really small part on it, but I really can not figure out what is wrong. 我知道我遗漏了很小的一部分,但是我真的无法弄清楚哪里出了问题。
Can you give me a push? 你能给我推吗?
AFAIK, there never was a 0.0.x version of the Play Services SDK. AFAIK,从来没有0.0.x版本的Play Services SDK。 Try perhaps
compile 'com.google.android.gms:play-services:6.1.11'
or compile 'com.google.android.gms:play-services:6.1.+'
. 尝试
compile 'com.google.android.gms:play-services:6.1.11'
或compile 'com.google.android.gms:play-services:6.1.+'
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.