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

后端 未结 10 1903
名媛妹妹
名媛妹妹 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: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')
    }
    

提交回复
热议问题