Google Play Services GCM 9.2.0 asks to “update” back to 9.0.0

前端 未结 11 1548
眼角桃花
眼角桃花 2020-12-07 11:35

So this morning I started updating to the latest version of my project libraries.

I\'m trying to update GCM to the latest version 9.2.0, but I get this error:

<
11条回答
  •  盖世英雄少女心
    2020-12-07 12:25

    I had the same problem, today 2016 - october - 06 I solved with this:

    I changed all dependencies that began with 9.?.? to 9.6.1 I compiled with sdk version 24 and target version 17.

    There is another packages in my solution because I used more things then only authentication.

    After changed your build.gradle (Module:app) with the code below do it:

    1. Put your package NAME in the line with the words applicationId "com.YOUR_PACKAGE_HERE"

    2. Synchronize your project (Ctrl+alt+v) and Build Again.

    This is the code of the file buid.gradle (Module:app) that worked for me:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 24
        buildToolsVersion "24.0.3"
        defaultConfig {
            applicationId "com.YOUR_PACKAGE_HERE"
            minSdkVersion 24
            targetSdkVersion 17
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
    
        compile 'com.google.firebase:firebase-core:9.6.1'
        compile 'com.google.firebase:firebase-database:9.6.1'
    
        compile 'com.android.support:appcompat-v7:24.2.1'
        compile 'com.android.support:design:24.2.1'
    
        compile 'com.google.firebase:firebase-crash:9.6.1'
        testCompile 'junit:junit:4.12'
    
        compile 'com.google.firebase:firebase-messaging:9.6.1'
    
        compile 'com.google.firebase:firebase-ads:9.6.1'
    
    
        compile 'com.google.firebase:firebase-auth:9.6.1'
    
    
        compile 'com.google.android.gms:play-services:9.6.1'
    
    }
    apply plugin: 'com.google.gms.google-services'
    

提交回复
热议问题