自最初发布以来,我一直在使用 Android Studio,没有任何 ProGuard 问题。今天突然停止工作了。据我所知,任何会干扰 Proguard 的文件都没有改变。例如,我的 ProGuard 配置文件保持不变,并且自上次成功构建以来,ActionBarSherlock(现在遇到错误的模块之一)没有以任何方式更改。
推荐使用的错误日志-dontskipnonpubliclibraryclassmembers
并不能解决问题。使用包含的默认配置而不是我自己的配置运行 ProGuard 仍然会导致相同的错误。
据我所知,当 Android Studio 构建我的应用程序时,模块现在正在从应用程序中剥离。我不确定它是否只是没有将适当的标志传递给 ProGuard,或者 Proguard 是否自行删除它们。
一些相关日志:
ProGuard: [Meditation Assistant] Warning: com.actionbarsherlock.widget.SuggestionsAdapter: can't find referenced field 'android.content.Context mContext' in class com.actionbarsherlock.widget.SuggestionsAdapter
ProGuard: [Meditation Assistant] Warning: com.actionbarsherlock.widget.SuggestionsAdapter: can't find referenced method 'android.database.Cursor getCursor()' in class com.actionbarsherlock.widget.SuggestionsAdapter
ProGuard: [Meditation Assistant] Warning: com.actionbarsherlock.widget.SuggestionsAdapter: can't find referenced field 'android.database.Cursor mCursor' in class com.actionbarsherlock.widget.SuggestionsAdapter
--snip--
ProGuard: [Meditation Assistant] You should check if you need to specify additional program jars.
ProGuard: [Meditation Assistant] Warning: there were 10 unresolved references to classes or interfaces.
ProGuard: [Meditation Assistant] You may need to specify additional library jars (using '-libraryjars').
ProGuard: [Meditation Assistant] Warning: there were 191 unresolved references to program class members.