2

I am working on an Android application and added fire-base Crashlytics, but in some devices I am getting the below issue continuously.

How can I resolve this issue?

Gradle:

   dependencies {
    //noinspection GradleCompatible
    implementation 'com.android.support:support-v4:26.1.0'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
    implementation 'com.google.code.gson:gson:2.7'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    testImplementation 'junit:junit:4.12'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation('org.apache.httpcomponents:httpmime:4.3.6') {
        exclude module: 'httpclient'
    }
    implementation 'org.apache.httpcomponents:httpclient-android:4.3.5'
    implementation 'com.squareup.picasso:picasso:2.3.2'
    implementation 'com.baoyz.pullrefreshlayout:library:1.2.0'
    implementation 'com.cocosw:bottomsheet:1.+@aar'
    implementation 'com.android.support:multidex:1.0.1'
    implementation 'id.zelory:compressor:2.1.0'
    //google services
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.google.firebase:firebase-core:11.4.2'
    implementation 'com.google.firebase:firebase-messaging:17.1.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
    implementation 'com.google.firebase:firebase-crash:15.0.2'
    implementation 'com.google.android.gms:play-services-analytics:15.0.2'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
}

Error:

  Caused by java.lang.ClassNotFoundException
    Didn't find class "com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" 
on path: DexPathList[[zip file "/data/app/com.karvyclick.fos-1/base.apk"],nativeLibraryDirectories=
[/data/app/com.karvyclick.fos-1/lib/arm, /system/lib, /vendor/lib]]
9
  • Using proguard ? Commented Sep 3, 2018 at 10:31
  • buildTypes { debug { minifyEnabled false useProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules_new.pro' } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules_new.pro' } } Commented Sep 3, 2018 at 10:46
  • @Redman please check ,my above comment Commented Sep 3, 2018 at 10:46
  • proguard is off . Are you using multidex ? Commented Sep 3, 2018 at 11:01
  • yes i am using multidex Commented Sep 3, 2018 at 11:25

3 Answers 3

3

To fix this issue, you must add to gradle:

implementation 'com.google.android.gms:play-services-measurement-impl:17.0.0'
implementation 'com.google.android.gms:play-services-ads:18.0.0'

You can see comments from this link

Sign up to request clarification or add additional context in comments.

Comments

1

Try changing Proguard.cfg file to exclude obfuscating android.gms.*

-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**

Comments

1

Just upgrade the play-services-ads to 18.1.1

implementation 'com.google.android.gms:play-services-ads:18.1.1'

As Described in release note

  • Added dependencies on play-services-measurement and play-services-measurement-sdk.

Apps no longer need to add these dependencies explicitly.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.