android - 当我导出应用程序时出现混淆错误

标签 android proguard

[2013-03-06 16:35:09 - mathsMagic] Proguard returned with error code 1. See console
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced method 'void onSetLayoutParams(android.view.View,android.view.ViewGroup$LayoutParams)' in class android.support.v7.widget.ViewGroup
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced method 'void onViewAdded(android.view.View)' in class android.support.v7.widget.ViewGroup
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced method 'void onViewRemoved(android.view.View)' in class android.support.v7.widget.ViewGroup
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced method 'void onChildVisibilityChanged(android.view.View,int,int)' in class android.support.v7.widget.ViewGroup
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced field 'int mPaddingLeft' in class android.support.v7.widget.GridLayout
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced field 'int mPaddingRight' in class android.support.v7.widget.GridLayout
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced field 'int mPaddingTop' in class android.support.v7.widget.GridLayout
[2013-03-06 16:35:09 - mathsMagic] Warning: android.support.v7.widget.GridLayout: can't find referenced field 'int mPaddingBottom' in class android.support.v7.widget.GridLayout
[2013-03-06 16:35:09 - mathsMagic]       You should check if you need to specify additional program jars.
[2013-03-06 16:35:09 - mathsMagic] Warning: there were 8 unresolved references to program class members.
[2013-03-06 16:35:09 - mathsMagic]          Your input classes appear to be inconsistent.
[2013-03-06 16:35:09 - mathsMagic]          You may need to recompile them and try again.
[2013-03-06 16:35:09 - mathsMagic]          Alternatively, you may have to specify the option 
[2013-03-06 16:35:09 - mathsMagic]          '-dontskipnonpubliclibraryclassmembers'.
[2013-03-06 16:35:09 - mathsMagic] java.io.IOException: Please correct the above warnings first.
[2013-03-06 16:35:09 - mathsMagic]  at proguard.Initializer.execute(Initializer.java:321)
[2013-03-06 16:35:09 - mathsMagic]  at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-03-06 16:35:09 - mathsMagic]  at proguard.ProGuard.execute(ProGuard.java:86)
[2013-03-06 16:35:09 - mathsMagic]  at proguard.ProGuard.main(ProGuard.java:492)

最佳答案

将此行添加到您的 Proguard 配置文件中:

-keep class android.support.v7.widget.** { *; }

如果这不起作用,请尝试以下操作:

-dontwarn  android.support.v7.widget.**

关于android - 当我导出应用程序时出现混淆错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15245918/

相关文章:

android - ProGuard:找不到引用的类 com.google.android.gms.R

java - Android混淆器: Is minifyEnabled true automatically setting obfuscation to true?

android - onCreateDialogView 和 onDialogClosed 未在 v7 中找到支持 DialogPreference

java - 返回原始开始位置,无需退出应用程序并再次打开它

Android - 如何在 SQLite 数据库中存储 html 字符串

android - Retrofit2 - 缺少@GET URL 或@Url 参数 - Proguard

android - OpenFire 服务器检查 XMPP 的连接

android - 如何将curl命令转为http post请求

android - Proguard 混淆和渲染脚本

android - 如何在 Android Studio 中配置 Proguard?