gpt4 book ai didi

android - 从 Proguard 获取 "unresolved references"和 "can' t 找到父类(super class)警告

转载 作者:太空宇宙 更新时间:2023-11-03 12:15:48 25 4
gpt4 key购买 nike

我已经将一些第三方源集成到我的 android 项目中,但在启用混淆器的情况下构建它时遇到了问题。构建失败:

Warning: there were 123 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 201 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.

:app:transformClassesAndResourcesWithProguardForRelease FAILED

FAILURE: Build failed with an exception.

有许多注释和警告需要整理,但我无法弄清楚它的正反面。我尝试添加 --keep class example.package.** { *; } 对于所有似乎引起警告的东西,但它仍然失败。任何人都可以提出处理此类问题的策略吗?例如,如果我看到这个:

警告:info.guardianproject.netcipher.client.MyDefaultClientConnectionOperator:找不到父类(super class)或接口(interface) ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnectionOperator

我该怎么办?

最佳答案

将以下内容添加到您的 proguard 文件中将解决编译问题:

-dontwarn info.guardianproject.netcipher.**

也就是说,您应该仔细阅读这可能带来的任何后果。 Proguard 通常会出于充分的理由发出警告。

关于android - 从 Proguard 获取 "unresolved references"和 "can' t 找到父类(super class)警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36613283/

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