当我执行以下命令时:
gradlew assebleRelease
但是得到一些奇怪的警告:
Warning: a.a.e.a.i: can't find referenced class a.a.e.a.i$a.a.e.a.o
Warning: a.a.e.s: can't find referenced class a.a.e.s$a.a.e.t
Warning: a.a.e.s: can't find referenced class a.a.e.s$a.a.e.t
Warning: a.a.e.t: can't find referenced class a.a.e.s$a.a.e.t
Warning: a.a.e.t: can't find referenced class a.a.e.s$a.a.e.t
我试了很多-keep - donwarn行,但没有人解决这个问题。为什么在这些警告的右侧会出现混淆的类名?
你应该试试-
-keep public class models.* { *; }
或者你将不得不根据项目中使用的库进行配置
也可以试试上面的
-dontwarn com.google.android.**
-dontwarn okio.Okio
-dontwarn okio.DeflaterSink
-keep class javax.**
-keepattributes JavascriptInterface
它对我有效。我希望它对你也有用