生成发布apk时带有混淆类名的Proguard警告

时间:2016-10-21 08:49:11

标签: android proguard

当我运行以下命令时:

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 -dontwarn行,但没有人解决这个问题。为什么在这些警告的右侧会出现模糊的类名?

1 个答案:

答案 0 :(得分:0)

你应该试试 -

  

-keep public class models.* { *; }

或者您必须根据项目中使用的库进行配置

也尝试使用上面的内容 -

-dontwarn com.google.android.**
-dontwarn okio.Okio
-dontwarn okio.DeflaterSink
-keep class javax.**
-keepattributes JavascriptInterface
它对我有用。我希望它也适合你