gpt4 book ai didi

android - 在项目中添加 Crashlytics 有 Dexguard

转载 作者:行者123 更新时间:2023-12-05 06:10:42 35 4
gpt4 key购买 nike

我厌倦了将我的项目与 Crashlytics 同步。在我的应用程序中使用 Dexguard,在发布的应用程序中未与 Crashlytics 同步。

并在 Dexguard 文件中添加此代码:

-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.** { *; }

并在 Gradle 文件中添加此代码:

firebaseCrashlytics {
mappingFileUploadEnabled true
}

此外,我在 Dexguard 文件中注释了这一行:

-printmapping mapping.txt

如何解决?

最佳答案

我有同样的问题,我在同步时遇到错误:

类型“UploadMappingFileTask”属性“没有配置值”

所以我在构建类型中的 gradle 中添加了 mappingFileUploadEnabled = false

  buildTypes {

all {

firebaseCrashlytics {
mappingFileUploadEnabled = false
}
}

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

}
}

关于android - 在项目中添加 Crashlytics 有 Dexguard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64312717/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com