简体   繁体   中英

add Crashlytics in project have Dexguard

I am tired to sync my project whit Crashlytics. in my app using Dexguard and in release app is not synced whit Crashlytics.

and add this code in Dexguard file:

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.google.firebase. { *; }
-dontwarn com.google.firebase.
-keep class com.crashlytics. { *; }
-dontwarn com.crashlytics.
-keep class com.google.android.gms.internal.** { *; }

and add this code in Gradle file:

firebaseCrashlytics {
                mappingFileUploadEnabled true
            }

also, I comment this line in Dexguard files:

-printmapping mapping.txt

how to fix it?

i have same issue and i was getting error in syncing:

Type 'UploadMappingFileTask' property ' doesn't have a configured value

so i added mappingFileUploadEnabled = false in gradle inside build types

  buildTypes {
  
    all {
      
        firebaseCrashlytics {
            mappingFileUploadEnabled = false
        }
    }

debug{
 ....
   }
 release{
......

  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM