首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Proguard混淆失败与tinylog

Proguard混淆失败与tinylog
EN

Stack Overflow用户
提问于 2022-01-26 16:31:16
回答 1查看 46关注 0票数 1

我和TinyLog一起使用Proguard。以下内容是在proguard.conf文件中定义的,正如在Tinylog主页上所述

代码语言:javascript
复制
-keepnames interface org.tinylog.**
-keepnames class * implements org.tinylog.**
-keepclassmembers class * implements org.tinylog.** { <init>(...); }

下列错误消息来自混淆过程:

代码语言:javascript
复制
[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不是一种选择

EN

回答 1

Stack Overflow用户

发布于 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/版本重复错误时,使用保护程序

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70866929

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档