gpt4 book ai didi

java - 使用 Eclipse IDE 排除第 3 方库,它是来自 ProGuard 的类和子类

转载 作者:太空宇宙 更新时间:2023-11-04 12:59:09 27 4
gpt4 key购买 nike

当我尝试在 ProGuard 中排除第 3 方库时出现以下错误。

它正在编译,如果我在 proguard-project.txt 中添加“-dontwarn com.ak.systemservice.core.security.FuncManager”,但尝试运行时崩溃。

基本上,我不想混淆 jar 或整个 jar 中的“com.ak.systemservice.core.security.FuncManager”类,并且希望在我的 Activity 中使用“com.ak.systemservice.core.security.FuncManager”。提前致谢。

错误如下:

[2016-01-26 17:00:27 - MyApp] Proguard returned with error code 1. See console

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.os.ServiceManager

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.os.ServiceManager

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService$Stub

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService$Stub

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class com.ak.systemservice.core.security.FuncManager$1

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class com.ak.systemservice.core.security.FuncManager$1

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

[2016-01-26 17:00:27 - MyApp] Warning: com.ak.systemservice.core.security.FuncManager: can't find referenced class android.security.FuncService

最佳答案

您可以通过避免此类被缩小来解决此问题。将其添加到您的 proguard 文件中,

-keep class com.ak.** { *; }
-keep interface com.ak.** { *; }
-keep enum com.ak.** { *; }

或者您也可以保留个人类(class)。像这样,

-keep class com.ak.systemservice.core.security.FuncManager

关于java - 使用 Eclipse IDE 排除第 3 方库,它是来自 ProGuard 的类和子类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35070359/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com