簡體   English   中英

ProGuard混淆后無法從Library.jar文件導入class

[英]Cannot import class from Library.jar file after ProGuard Obfuscation

我已經構建了一個.jar 庫文件。 我可以在我的項目中正常導入它,但是在 Proguard 混淆之后,我無法再從該庫中調用類/函數。 My package and classes have been converted to a.class, b.class, c.class as shown in the picture below.

在此處輸入圖像描述

ProGuard 重命名類。 分發庫時,需要配置 ProGuard 不重命名需要暴露的 API。

您可以添加如下規則:

-keep public class * {
     public protected *;
}

這將停止重命名所有公共類中的所有公共和受保護方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM