Search code examples
androidfirebasegradlecrashlyticsandroid-r8

Firebase Crashlytics Minify R8 Android


The app works fine under normal instances but when I try to implement minify and R8. This raises the following error.

* What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileAlpha'.
> Failed to calculate the value of task ':app:uploadCrashlyticsMappingFileAlpha' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':app:processAlphaGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:uploadCrashlyticsMappingFileAlpha'.

//..... More Error Line

I get the above error and Absolutely have no idea what's happening.

buildTypes {
        getByName("debug") {
            applicationIdSuffix = ".sandbox"
            debuggable true
        }
        alpha {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            versionNameSuffix ".alpha"
        }
}

This is the above code I used and I am trying to build Alpha but when I Debug works fine.


Solution

  • Update

    There is a new version for Google Play Services, and it seems to fix the issue. You can use 4.3.13. They have brought back the missing function for this sake.


    Original Answer

    Please downgrade the Google Play Services to 4.3.10. I don't know the reasoning behind it, but it seems 4.3.12 is not compatible.

    Here is the issue I created on Google issuetracker:

    https://issuetracker.google.com/issues/237071883