我和TinyLog一起使用Proguard。以下内容是在proguard.conf文件中定义的,正如在Tinylog主页上所述
-keepnames interface org.tinylog.**
-keepnames class * implements org.tinylog.**
-keepclassmembers class * implements org.tinylog.** { <init>(...); }下列错误消息来自混淆过程:
[proguard] Note: there were 1 duplicate class definitions.
[proguard] (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
[proguard] Warning: there were 2 classes in incorrectly named files.
[proguard] You should make sure all file names correspond to their class names.
[proguard] The directory hierarchies must correspond to the package hierarchies.
[proguard] (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
[proguard] If you don't mind the mentioned classes not being written out,
[proguard] you could try your luck using the '-ignorewarnings' option.
[proguard] Error: Please correct the above warnings first. 有人知道如何纠正错误吗?
我正在使用tinylog 2.4.1
在-ignorewarnings中使用proguard.conf不是一种选择
发布于 2022-02-01 12:10:59
下面是一个最小的Android示例项目,它使用tinylog 2进行日志记录,使用ProGuard进行混淆:https://github.com/tinylog-org/tinylog-android-example。最新版本的Gradle Android构建工具(com.android.tools.build:gradle:7.1.0)没有输出发布的警告。
如果必须在Gradle脚本中使用旧版本的ProGuard或自定义ProGuardTask,则可以删除模块-info文件,如下所述:元-INF/版本重复错误时,使用保护程序
https://stackoverflow.com/questions/70866929
复制相似问题