gpt4 book ai didi

android - Crashlytics 不会对代码进行去混淆处理

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:11:23 24 4
gpt4 key购买 nike

我遇到了 Frabric(Crashlytics) 服务的神秘问题。
我发现 crashlytics 不会自动去混淆崩溃日志。

顶级构建文件中的 io.fabric.tools 版本 1.19.1 和 android.tools 版本 1.2.3:

dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'io.fabric.tools:gradle:1.19.1'
}

BuildTypes 配置:

buildTypes {
debug{
debuggable true
jniDebuggable true
}
release {
debuggable false
jniDebuggable false
minifyEnabled true
proguardFiles 'proguard-coda.txt', 'proguard-rules.pro'
}
}

和依赖项:

compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
transitive = true
}

proguard 配置文件包含:

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

从 gradle 控制台我看到与 crashlytics 相关的任务 :app:crashlyticsStoreDeobsRelease:app:crashlyticsUploadDeobsRelease:

Executing tasks: [:app:assembleRelease]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
...............................
:app:fabricGenerateResourcesRelease
:app:processReleaseResources
:app:generateReleaseSources
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJava UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:collectReleaseMultiDexComponents UP-TO-DATE
:app:proguardRelease UP-TO-DATE
:app:shrinkReleaseMultiDexComponents UP-TO-DATE
:app:createReleaseMainDexClassList UP-TO-DATE
:app:retraceReleaseMainDexClassList UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:crashlyticsStoreDeobsRelease <=====
:app:crashlyticsUploadDeobsRelease <=====
:app:lintVitalRelease
:app:validateExternalOverrideSigning
:app:packageRelease
:app:zipalignRelease
:app:assembleRelease

BUILD SUCCESSFUL

Total time: 11.569 secs

但是崩溃日志仍然没有去混淆。

Caused by: java.lang.RuntimeException: Test exception!!!
at coda.RootActivity.onCreate(SourceFile:189) <====
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)

有人可以帮我吗?

最佳答案

我检查了我们的一个项目,我们没有在 proguard 配置中使用这一行,它工作正常

-renamesourcefileattribute SourceFile

关于android - Crashlytics 不会对代码进行去混淆处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31289316/

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