且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Proguard返回了错误代码1,错误找不到引用的类android.support.v4.app

更新时间:2023-11-16 19:42:16

这是我在Proguard中为Android支持所做的事情

this is what i do in my proguard for android support

#########--------Android Support--------#########
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-dontwarn android.support.**

如指向 ProGuard故障排除页面您的控制台日志中,应将project.properties中的目标更改为包含缺少类的目标.在这种情况下:"android-18"或"Google Inc.:Google APIs:18".

As indicated by the link to the ProGuard Troubleshooting page in your console log, you should change the target in project.properties to a target that contains the missing classes. In this case: "android-18" or maybe "Google Inc.:Google APIs:18".

您仍然可以在AndroidManifest.xml中指定其他minSdkVersion.

You can still specify a different minSdkVersion in AndroidManifest.xml.

您不应指定任何-libraryjars选项,因为Android构建过程已经为您指定了这些选项-您现在只会看到有关重复类的警告.实际上,Android构建过程还会为您指定其他大多数选项.

You should not specify any -libraryjars options, since the Android build process already specifies those options for you -- you'll just see warnings about duplicate classes now. In fact, the Android build process specifies most other options for you as well.

来源:此处