After upgrading to google play services 8.4.0 my app crashes on startup

后端 未结 10 1835
名媛妹妹
名媛妹妹 2020-12-11 00:24

I\'ve been previously using google play services 8.3.0 without any issue. I\'m looking to upgrade to google play services 8.4.0. I\'m using the following play libraries:

相关标签:
10条回答
  • 2020-12-11 00:43

    Removing and reinstalling Google Services from the SDK manager and deleting the contents of your-project/.gradle/ solved it for me

    0 讨论(0)
  • 2020-12-11 00:47

    I ran into this issue just now. I upgraded from 7.8.0 to 8.4.0 and received the same error that you did. Rebuilding and/or cleaning the project worked for me.

    0 讨论(0)
  • 2020-12-11 00:56

    compile 'com.google.android.gms:play-services:+' compile 'com.google.firebase:firebase-core:+'

    What works for me

    0 讨论(0)
  • 2020-12-11 00:57

    When selectively compile Google Play service APIs on 8.4.0, I've also encountered problems (8.3.0 -> 8.4.0).

    Error:

    Could not find method com.google.android.gms.common.internal.zzx.zzy
    

    Before upgrade:

    compile 'com.google.android.gms:play-services-maps:8.3.0'
    

    After upgrade (doesn't work):

    compile 'com.google.android.gms:play-services-maps:8.4.0'
    

    After upgrade (works fine):

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

    Conclusion: it seems like some of the play services now have some certain dependencies that you have to explicitly specify, e.g.: maps -> gcm.

    0 讨论(0)
  • 2020-12-11 00:59

    I have face same problem and resolve this issue by configuring proguard rules properly.

    What I did here under as below:

    First I have excluded google classes from obfuscating like this in proguard-rules.pro:

    -keep public class com.google.** {*;}
    

    Second I have enabled this minifyEnabled in build.gradle like this:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
    
        defaultConfig {
            applicationId "com.e2e.quiz"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.1.1'
        compile 'com.android.support:recyclerview-v7:23.1.1'
        compile 'com.android.support:design:23.1.1'
        compile 'com.github.bumptech.glide:glide:3.6.1'
        compile 'com.squareup.picasso:picasso:2.4.0'
        compile 'com.google.android.gms:play-services-gcm:9.2.1'
        compile 'com.google.android.gms:play-services-analytics:9.2.1'
        compile 'com.google.android.gms:play-services-ads:9.2.1'
        compile project(':ast-dst')
    }
    
    0 讨论(0)
  • 2020-12-11 01:02

    I was able you solve this. My coworker was able to upgrade without issues. I went to my sdk/extras folders saw mine was pretty different. So I moved my folder copied my coworkers and it worked.

    I think that folder and maybe something else in the sdk folder had just gotten into an odd state, clearing the folder and redownloading may work too.

    0 讨论(0)
提交回复
热议问题