Firebase Crashlytics: failed for task ‘:news:uploadCrashlyticsMappingFileRelease’

[READ] Step 1:Steps that I have already tried?

Integrating Crashlytics to your react native app can literally be pain in the ass sometimes. I have found the solutions listed below :

  1. Implementing this piece of code in your App level Gradle.build :

afterEvaluate {
Task uploadMappingTask = tasks.findByName(“uploadCrashlyticsMappingFileRelease”)
if (uploadMappingTask != null) {
println “find uploadMappingTask”
Task packageTask = tasks.findByName(“packageRelease”)
if (packageTask != null) {
println “find packageTask”
uploadMappingTask.mustRunAfter(packageTask)
}
Task packageBundleTask = tasks.findByName(“packageReleaseBundle”)
if (packageBundleTask != null) {
println “find packageBundleTask”
uploadMappingTask.mustRunAfter(packageBundleTask)
}
}
}

  1. Delete these two lines for a temporary fix.

apply plugin: ‘com.google.firebase.crashlytics
implementation ‘com.google.firebase:firebase-crashlytics:X.X.X’

2a) Tried deleting these two lines, APK is also built but it crashes on start.

  1. Added this piece of code in App level build.gradle in release :
    firebaseCrashlytics {
    // nativeSymbolUploadEnabled true,
    mappingFileUploadEnabled true
    }

3a) Followed this solution as well after implementation got another bug of :

No signature of method: build_6elsnc00nil35c05ncglt9f91.android() is applicable for argument types: (build_6elsnc00nil35c05ncglt9f91$_run_closure1) values: [build_6elsnc00nil35c05ncglt9f91$_run_closure1@2ff1c989]

3b) now in context to solve the issue of NO SIGNATURE OF METHOD, I did few implementations.

3b1) inducing io.fabric in app level build.gradle/ downgrading io fabric which didn’t give any help.
dependencies {
classpath ‘io.fabric.tools:gradle:1.27.1’
}
3b2) watch for systemProps and remove them from gradle.properties.
systemProp.http.proxyHost=
systemProp.http.proxyPort=80
systemProp.https.proxyHost=
systemProp.https.proxyPort=80

they were not included in my gradle.properties.

  1. Tried solving Crashlytics bug by adding below mentioned lines in pro guard rules :

-keepattributes Annotation
-keepattributes SourceFile,LineNumberTable
prevent Crashlytics obfuscation
-keep class com.crashlytics.** { ; }
-dontwarn com.crashlytics.
*

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.0
  • Firebase Component: Crashlytics
  • Component version: 10.1.1
  • React Native : 0.63.4

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

install Firebase Crashlytics and try creating a signed APK on android 4.0, react native 0.63.4 and firebase 10.1.0.

1 possible answer(s) on “Firebase Crashlytics: failed for task ‘:news:uploadCrashlyticsMappingFileRelease’