启用缩小后无法识别 android 项目中的模块 类

After minified enabled unable to recognize module classes in android project

我的项目由主项目组成,它使用我为 HTTP 操作构建的自定义模块。我想混淆我的 apk,所以我在我的 android 项目和模块中启用了 minified to true。但是在运行时,我得到 类 in the module are not found 错误。我错过了什么吗? ]1

您需要修改混淆器文件以不删除那些 classes。

添加这样的内容

# Keep these classes
-keep class httplibrary.a2ahttp.constant.** { *; }

我无法完全阅读错误,因为你划掉了一大堆错误。但是,我提供的代码应该具有指向已删除内容的 class 路径。如果您将其添加到混淆器中,它将阻止它向您移动那些 classes。