Android - Firebase analytics not showing on dashboard after enabling minifyEnabled & shrinkResources

Viewed 96

I have enabled minifyEnabled & shrinkResources in my code. After enabling I am not getting any analytics of that app version on Analytics dashboard.

Do I need to make any proguard changes for firebase analytics?

build.gradle

buildTypes {
        debug {
            
        }
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            firebaseCrashlytics {
                mappingFileUploadEnabled true
            }
        }
    }
1 Answers

First of all, try to add this to your proguard

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

Did you use any custom class for the source of the value you send? If yes then you should be adding that class to proguard as well

Related