简体   繁体   English

De模糊处理不适用于android studio 3.0

[英]De obfuscation not working with android studio 3.0

I have my code obfuscated with proguard that runs when a release version is build and during the publish of the APK in the play console, I upload the mapping.txt file in "Vitals" section. 我的代码混淆了proguard,该代码在构建发行版本时运行,并且在Play控制台中发布APK的过程中,在“重要”部分上载了mapping.txt文件。

When an exception raises I can read clear code in stacktraces (in crashlytics and in Play console). 当出现异常时,我可以在stacktraces中读取清晰的代码(在crashlytics和Play控制台中)。

With previous version of Android studio (<= 2.3.3) all works regulary, now after the upgrade to Android studio 3.0 the same process will not de obfuscate stacktraces anymore. 使用以前版本的Android Studio(<= 2.3.3)可以正常运行,现在升级到Android Studio 3.0之后,相同的过程将不再使堆栈跟踪变得模糊。

I came across the migration of gradle plugin introducing the needed modifies 我遇到了gradle插件的迁移,介绍了需要的修改

build.gradle (app): build.gradle(应用程序):

    flavorDimensions "mode"
        productFlavors {
        full {
        dimension "mode"
        }
    }
    ...
    buildTypes {
    release {
        multiDexEnabled true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
    debug {
        ext.enableCrashlytics = false
        versionNameSuffix "-DEBUG"
        }
    }

What's wrong in the configuration? 配置有什么问题? The mapping.txt file is correctly uploaded and accepted by Play Console. Play控制台已正确上传并接受了mapping.txt文件。 Any hint? 有什么提示吗?

It's new in android, when you upload the mapping file, it Deobfuscate your code so you can understand the stack trace. 这是android中的新功能,当您上传映射文件时,它会对代码进行模糊处理,以便您可以理解堆栈跟踪。 This is the documentation link, it says: 这是文档链接,它说:

If you use ProGuard to optimize and obfuscate your APK files, you can upload a ProGuard mapping file for each version of your app on the Play Console to deobfuscate your crash stack traces and help you better analyze your app's crashes. 如果您使用ProGuard来优化和模糊化APK文件,则可以在Play控制台上为每个版本的应用程序上传ProGuard映射文件,以模糊化崩溃堆栈的踪迹并帮助您更好地分析应用程序的崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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