After Downloading app from google play store getting crashed?
Asked Answered
E

4

6

My app is working fine when I build it from android studio. But the app is getting crashed when I download it from play store. Kindly find the attached crashlytics report in which the error is focused.enter image description here

Below is my build.gradle file

apply plugin: 'com.android.application'


buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}
android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "igpl.gfee.com.gfee"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 4
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

    }
    buildTypes {
        release {
            minifyEnabled false
            multiDexEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
    implementation 'com.github.scottyab:showhidepasswordedittext:0.8'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'com.google.firebase:firebase-core:10.0.1'
    implementation 'de.hdodenhof:circleimageview:1.2.1'
    //implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
    implementation 'com.github.lzyzsd:circleprogress:1.2.1'
    implementation 'com.budiyev.android:code-scanner:1.2.1'
    implementation 'com.google.code.gson:gson:2.8.0'
    //noinspection GradleCompatible
    implementation 'com.google.firebase:firebase-messaging:15.0.0'
    implementation 'com.yalantis:ucrop:2.2.0'
    implementation 'com.github.chrisbanes:PhotoView:1.3.0'

    // implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'
    //gson
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
        transitive = true;
    }

    //Retrofit and RxJava Integration
    implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
    implementation 'com.squareup.picasso:picasso:2.4.0'
    //gson and retrofit integration
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.okhttp:okhttp:2.4.0'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
    implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'


    //ButterKnife
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.github.silvestrpredko:dot-progress-bar:1.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'

Below is my androidmanifest file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="igpl.gfee.com.gfee">

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="16" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <!--<uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />-->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/gfee_logo_new"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/gfee_logo_new"
        android:supportsRtl="true"
        android:testOnly="false"
        android:theme="@style/AppTheme"
        tools:replace="android:icon,android:theme">

        <activity
            android:name=".SplashScreen"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".LoginActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.WorkSpace"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.MainSurvey"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.MainActivites.CreateOrganization"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.MainActivites.AddressFragment"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.MainActivites.CreateGroup"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".Fragments.Profile"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".QRScanner"
            android:screenOrientation="portrait" />
        <activity
            android:name=".GoalDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".ProjectDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".MileStoneDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".TaskDetailsDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".MeetingDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".FingerprintActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".Fragments.EditProfile"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name=".WebRemote"
            android:screenOrientation="portrait" />
        <activity
            android:name=".VersionNumber"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ChangePassword"
            android:screenOrientation="portrait" />

        <activity android:name=".Fragments.MainActivites.OrganizationsListData"
            android:screenOrientation="portrait"/>

        <activity android:name=".Fragments.MainActivites.OrganizationDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>

        <activity android:name=".Fragments.MainActivites.GroupDashBoard"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>

        <activity android:name=".Fragments.MainActivites.GroupsListData"
            android:screenOrientation="portrait"/>

        <activity
            android:name=".SurveyActivities.CreateSurvey"
            android:screenOrientation="portrait" />

        <activity android:name=".Fragments.Survey.SurveyinfoScreens"
            android:screenOrientation="portrait"/>

        <activity android:name=".Fragments.Survey.Survey_PaidInfoScreens"
            android:screenOrientation="portrait"/>

        <activity
            android:name=".Utils.TempActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait" />
        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            android:screenOrientation="portrait" />

        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="262e4ef469d58d4188b4f4c8169fd4e4fe1417a3" />
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/splash_logo" />
        <!--
            <activity
            android:name=".Fragments.Main2Activity"
            android:label="@string/title_activity_main2"></activity>
        -->

        <receiver android:name=".BoardcastReceiver.IncomingSms">
            <intent-filter>
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".FCM.FirebaseDataReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".FCM.MyBroadcastReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </receiver>

        <service android:name=".FCM.MyFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service
            android:name=".FCM.MyFirebaseInstanceIDService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
            android:permission="android.permission.INSTALL_PACKAGES"
            android:enabled="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER"/>
            </intent-filter>
        </receiver>

        <activity
            android:name=".Fragments.MainActivites.OrganizationDetails"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_scrolling"
            android:theme="@style/AppTheme"></activity>

        <activity android:name=".Fragments.MainActivites.OrganizationSummary"
            android:screenOrientation="portrait"/>
        <activity android:name=".Fragments.MainActivites.ImageZoomActivity"
            android:screenOrientation="portrait"/>
    </application>

</manifest>
Elisa answered 8/8, 2019 at 5:9 Comment(13)
might be because proguard obfuscated that classAhoy
have you implemented any Referal Service?Endbrain
what steps you followed to use InstallReferrerReceiver ?Davidadavidde
I didnt use any referal service.Elisa
@ManojPerumarath you want me to remove proguard?Elisa
@SunilP Your app is crashing after installing from play store because when you install any app from play store, an Install Referrer Broadcast is received. If you are not using any referrer service, do check any broadcast receiver registered in the app Manifest. Also, make sure if any recently added library has this receiver. You can check this in the merged manifest.Hendrix
@RishabhSagar Yes i have registered FCM boardcast receivers in androidmanifest file.Elisa
@SunilP can you add the manifest file here?Hendrix
I have added @RishabhSagarElisa
@SunilP I added an answer regarding this issueHendrix
Not a good practice to remove proguard, only remove from the above mentioned classAhoy
remove proguard, do not use minify and make app bundles and let playstore sign it.Trochee
In the merged manifest, can you find play-services-measurement-impl manifest?Donation
D
1

AppMeasurementInstallReferrerReceiver class is part of firebase-core library.

The error says that the AppMeasurementInstallReferrerReceiver class is not found in the dex path. This means the version you are using doesn't contain the specified class.

From the Manifest, we can see that you are using firebase-core version of 10.0.1. Update the firebase-core to 17.0.1 and firebase-messaging to 19.0.1.

Test it from the ADB or release it in the on the Play Store to test it.

Donation answered 8/8, 2019 at 6:39 Comment(4)
when i change the versions of my firebase-core and firebase-messaging I am getting below error tools:replace specified at line:19 for attribute android:appComponentFactory, but no new value specified app main manifest Manifest merger failed with multiple errors, see logs at com.android.builder.core.AndroidBuilder.mergeManifestsForApplicationElisa
Can you try (firebase-core) with 16.0.8 and (firebase-messaging) 18.0.0Donation
ya it worked without any error. but let me try on my primary bug after publishing the app in play store.Elisa
Thanks @Srikar Reddy after changing firebase to 16.0.8 and firebase-messaging to 18.0.0 it worked for meElisa
M
0

Disable R8 code shrinker and update on playstore

go to->gradle.properties
add -> android.enableR8 = false
Medullated answered 8/8, 2019 at 5:25 Comment(0)
H
0

Remove this receiver from the Manifest, if you are not using this.

    <receiver
        android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
        android:permission="android.permission.INSTALL_PACKAGES"
        android:enabled="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER"/>
        </intent-filter>
    </receiver>
Hendrix answered 8/8, 2019 at 5:38 Comment(6)
I am not using it. I have just added it because of the error which I facing but it didnt helped me. Ok i will removeElisa
So you want me to remove that and checkElisa
@SunilP yes, remove this receiver and upload the APK to play store. This will work for sure.Hendrix
Ok i have removed it. But it still remains as the previous I think again same error will I face?Elisa
If you want to check without uploading it to play store, you can try to send the broadcast using ADB.Hendrix
Let us continue this discussion in chat.Elisa
Z
0

Maybe because of minifyEnabled false. You can apply the release mode rules to debug mode and check.

buildTypes {
        release {
            minifyEnabled false
            multiDexEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    debug {
            minifyEnabled false
            multiDexEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
Ziska answered 8/8, 2019 at 5:44 Comment(1)
let me try @ZiskaElisa

© 2022 - 2024 — McMap. All rights reserved.