[Solved] Execution failed for task ‘:app:uploadCrashlyticsMappingFileRelease‘

Problem: Recently, when doing a project, an error occurred in the online package of release:

 Execution failed for task ':app:uploadCrashlyticsMappingFileRelease'

 

Reason: This problem is caused by the use of Google’s firebase library, which is the culprit:

com.google.firebase:firebase-crashlytics

 

Solution: Add the following code to Android {} of gradle of app

gradle.taskGraph.whenReady {
    tasks.each { task ->
        if (task.name.contains("uploadCrashlyticsMappingFileRelease")) {
            task.enabled = false
        }
    }
}

Note: this method can only solve this issue temporary, if you know other solutions, please leave a comment and let me know!

Read More: