当使用Proguard的,你需要为每个引用的库一个单独的配置? [英] When using Proguard, do you need a separate config for each referenced library?
本文介绍了当使用Proguard的,你需要为每个引用的库一个单独的配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序有哪些是工作空间的项目引用HoloEverywhere和SherlockActionBar,两者兼而有之。当我启用了Proguard的只有应用程序,它崩溃给这些错误:
My application has references to HoloEverywhere and SherlockActionBar, both which are in-workspace projects. When I enabled Proguard for the application only, it crashes giving these errors:
11-15 11:50:11.090: E/AndroidRuntime(24823): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
11-15 11:50:11.090: E/AndroidRuntime(24823): at com.actionbarsherlock.a.a(Unknown Source)
11-15 11:50:11.090: E/AndroidRuntime(24823): at org.holoeverywhere.a.a.l(Unknown Source)
11-15 11:50:11.090: E/AndroidRuntime(24823): at org.holoeverywhere.a.a.setContentView(Unknown Source)
这是因为我才启用Proguard的的应用程序,而不是其他的工作空间项目HE和ABS?
Is this because I only enabled Proguard for the app and not the other in-workspace projects HE and ABS?
我使用的是默认的ProGuard-project.txt在SDK中,并没有添加任何其他规则。
I am using the default proguard-project.txt in the sdk and did not add any additional rules.
推荐答案
没有你不知道。
使用这些规则,以保持引用的类未混淆。
Use these rules to keep the referenced classes un-obfuscated.
-keep class com.actionbarsherlock.** {*;}
-keep class org.holoeverywhere.** {*;}
这篇关于当使用Proguard的,你需要为每个引用的库一个单独的配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文