If there are unresolved references to class members in program classes, your compiled class files are most likely inconsistent. Possibly, some class file didn’t get recompiled properly, or some class file was left behind after its source file was removed. Try removing all compiled class files and rebuilding your project.
If there are unresolved references to class members in library classes, your compiled class files are inconsistent with the libraries. You may need to recompile the class files, or otherwise upgrade the libraries to consistent versions.
######################以下是原生设置的混淆文件####################### ###########还有很多其他规则,这里不详细列举,度娘一下,你就知道########## # This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html
# Keep all Fragments in this package, which are used by reflection. -keep public class com.android.settings.** extends android.app.Fragment
# Keep all preference controllers needed by slice and DashboardFragment. -keep class * extends com.android.settings.core.BasePreferenceController { *; }
-keep class * extends com.android.settings.core.TogglePreferenceController { *; }
# We want to keep methods in Activity that could be used in the XML attribute onClick. -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); public void *(android.view.MenuItem); }
# Keep setters in Views so that animations can still work. -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int);
void set*(***); *** get*(); }
# Keep classes that may be inflated from XML. -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int, int); }
# Keep annotated classes or class members. -keep @android.support.annotation.Keep class * -keepclassmembers class * { @android.support.annotation.Keep *; }
# Keep specific fields used via reflection. -keepclassmembers class * { public static ** SEARCH_INDEX_DATA_PROVIDER; public static ** SUMMARY_PROVIDER_FACTORY; } -keep class android.support.v4.app.CoreComponentFactory