Proguard - 使用roboguice-sherlock和sherlock构建Android

时间:2013-09-11 23:35:47

标签: android maven actionbarsherlock proguard roboguice

我正在尝试使用 proguard-maven-plugin 通过Android应用程序构建,但不幸的是我遇到了一些问题。

我正在使用 roboguice-sherlock actionbarsherlock 库,我收到以下警告:

 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockActivity extends or implements program class com.actionbarsherlock.app.SherlockActivity
 [proguard] Warning: library class com.github.rtyley.android.sherlock.android.accounts.SherlockAccountAuthenticatorActivity extends or implements program class com.actionbarsherlock.app.SherlockActivity
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockFragmentActivity extends or implements program class com.actionbarsherlock.app.SherlockFragmentActivity
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockListActivity extends or implements program class com.actionbarsherlock.app.SherlockListActivity
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockPreferenceActivity extends or implements program class com.actionbarsherlock.app.SherlockPreferenceActivity
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.fragment.RoboSherlockDialogFragment extends or implements program class com.actionbarsherlock.app.SherlockDialogFragment
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.fragment.RoboSherlockFragment extends or implements program class com.actionbarsherlock.app.SherlockFragment
 [proguard] Warning: library class com.github.rtyley.android.sherlock.roboguice.fragment.RoboSherlockListFragment extends or implements program class com.actionbarsherlock.app.SherlockListFragment
 [proguard] Warning: there were 8 instances of library classes depending on program classes.
 [proguard]          You must avoid such dependencies, since the program classes will
 [proguard]          be processed, while the library classes will remain unchanged.
 [proguard]          (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
 [proguard] Error: Please correct the above warnings first.

据我所知,roboguice-sherlock库引用了actionbarsherlock库,该插件应该是程序代码。

有谁知道我怎么能克服这个问题?

1 个答案:

答案 0 :(得分:0)

您是否尝试使用 - 在您的proguard配置文件上执行dtwarn指令?

-dontwarn com.github.rtyley.android.sherlock.roboguice.**