简体   繁体   English

当我尝试在启用了Proguard的android应用中导出带签名的apk文件时遇到transformClassAndResourcWithProguardForRelease错误?

[英]transformClassAndResourcWithProguardForRelease error when I try export signed apk file in android app with proguard enabled?

It is the first time that I am using the proguard with the android app so it is kind of confusing me. 这是我第一次将proguard与android应用程序一起使用,这让我感到困惑。 Here's scenario about my problem: I enable the proguard in the gradle file and I run it on my phone it is working perfectly (without any error) but if I want to generate signed apk file then it shows this error . 这是关于我的问题的方案:我在gradle文件中启用了proguard 并在手机上运行了它,它工作正常(没有任何错误),但是如果我要生成签名的apk文件,则显示此错误 Why I want to generate the signed apk file because I want to check whether the proguard obfuscating and optimizing my app or not by decompiling the apk file. 为什么要生成签名的apk文件,因为我想通过反编译apk文件来检查proguard是否混淆和优化了我的应用程序。 Hence, My questions are: is there any way to check whether proguard is obfuscating and optimizing the app or not? 因此,我的问题是:有没有办法检查proguard是否混淆和优化了应用程序? and what is the problem with my generating signed apk file? 我生成的签名apk文件有什么问题? Here are the pictures of my proguard rules file: First , Second , Third and Last one . 这是我的proguard规则文件的图片: 第一第二第三最后一个

It is very likely that you got some warnings when running ProGuard in a release build. 在发行版本中运行ProGuard时,很可能会收到一些警告。 You should run the build with the -i flag and add also -verbose to your ProGuard rules to get a more verbose output. 您应该使用-i标志运行构建,并在ProGuard规则中添加-verbose以获得更详细的输出。

If you decide to ignore the warnings, you can also add -ignorewarnings to your rules and ProGuard will continue executing regardless if it detects some problems that you should fix. 如果您决定忽略警告,则还可以在规则中添加-ignorewarnings,并且ProGuard会继续执行,无论它是否检测到应解决的问题。

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

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