简体   繁体   English

为什么我不能依赖Google Play服务库?

[英]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.

相关问题 OneSignal 中的 Google Play 服务库错误,为什么? - Google Play Services Library Error in OneSignal, why? 如何在AVD上获取最新版本的Google Play服务? - How can I get the newest version of google play services on an AVD? 如何获得API客户端? (Google Play服务) - How can I get API client? (Google Play Services) Google Play服务:无法连接到服务器 - Google Play Services: can't connect to server 为什么我不能在 Google Play 上发布我的应用程序 - Why Can't I Publish My App On Google Play 错误:在项目“应用程序”中,在集成 onesignal 时,已解决的 Google Play 服务库依赖项依赖于另一个准确版本 - ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version while iintegrating onesignal 错误:在项目“应用”中,已解析的Google Play服务库依赖项依赖于另一个版本 - ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact versionn 在Android Studio中导入Google Play服务库 - Import Google Play Services library in Android Studio 将Google Play服务库添加到Qt项目中 - Adding Google Play Services library to Qt project 如何更改Google Play服务中插页式广告的尺寸? - How can i change size of interstitial ads in google play services?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM