更新Google Play服务GCM时出错

时间:2018-03-28 14:26:26

标签: android android-studio

我正在尝试通过更改以下行来更新播放服务GCM:

compile 'com.google.android.gms:play-services-gcm:9.2.1'

为:

compile 'com.google.android.gms:play-services-gcm:12.0.0'

然后我收到消息“安装存储库和同步项目”。当我这样做时,我得到对话框“查找可用的SDK组件”,并在弹出另一个消息后一段时间:

"Could not find dependency "com.google.android.gms:play-services-gcm:12.0.0"

我的完整build.gradle文件(如果有帮助)是:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 18
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.google.android.gms:play-services-gcm:12.0.0'
    compile 'net.danlew:android.joda:2.9.3.1'
    compile 'com.squareup.okhttp3:okhttp:3.3.1'
    compile 'com.squareup.okio:okio:1.8.0'
}

0 个答案:

没有答案