我在我的应用程序中使用 Proguard。Proguard 找不到我的任何类引用或引用的方法。我尝试了如下代码,但它没有用。
-keep class com.google.android.maps.** { ; } -keep 接口 com.google.android.maps。* { *; }
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keepattributes *Annotation*
-keepattributes Signature
-libraryjars libs/android-support-v4.jar
-libraryjars libs/aXMLRPC-1.7.0.jar
-libraryjars libs/httpmime-4.1.3.jar
-libraryjars libs/libammsdk.jar
-libraryjars libs/ormlite-android-4.42.jar
-libraryjars libs/ormlite-core-4.42.jar
-libraryjars libs/umeng_sdk.jar
-libraryjars libs/umeng_social_sdk.jar
-libraryjars libs/universal-image-loader-1.8.4.jar
-libraryjars ../ManGoActionbarLib/bin/mangoactionbarlib.jar
-libraryjars ../ManGoImageViewLib/bin/mangoimageviewlib.jar
-libraryjars ../ManGoSocialLib/bin/mangosociallib.jar
-libraryjars ../ManGoStyleLib/bin/mangostylelib.jar
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keep class com.google.android.maps.** { *; }
-keep interface com.google.android.maps.** { *; }
-keep public class * extends android.app.Application
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Fragment
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep class **.R$* {
*;
}
-keepclassmembers class * {
public <methods>;
}
这是错误日志:
[2013-06-27 22:53:54 - ManGoHumor] Proguard returned with error code 1. See console
[2013-06-27 22:53:54 - ManGoHumor] Note: there were 1962 duplicate class definitions.
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find superclass or interface com.google.android.maps.MapActivity
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find superclass or interface com.google.android.maps.ItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.GeoPoint
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapActenter code hereivity
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapController
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapView
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.GeoPoint
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapActivity
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapActivity
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapActivity
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapController
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapController
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapView
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapView
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced method 'android.view.View findViewById(int)' in class com.umeng.socialize.view.CommentDetail
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced method 'android.content.Intent getIntent()' in class com.umeng.socialize.view.CommentDetail
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced method 'android.content.res.Resources getResources()' in class com.umeng.socialize.view.CommentDetail
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced method 'boolean requestWindowFeature(int)' in class com.umeng.socialize.view.CommentDetail
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced method 'void setContentView(int)' in class com.umeng.socialize.view.CommentDetail
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.CommentDetail: can't find referenced class com.google.android.maps.MapView
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.ItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.ItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced method 'android.graphics.drawable.Drawable boundCenterBottom(android.graphics.drawable.Drawable)' in class com.umeng.socialize.view.map.UItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced method 'void populate()' in class com.umeng.socialize.view.map.UItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.ItemizedOverlay
[2013-06-27 22:53:54 - ManGoHumor] Warning: com.umeng.socialize.view.map.UItemizedOverlay: can't find referenced class com.google.android.maps.OverlayItem
[2013-06-27 22:53:54 - ManGoHumor] You should check if you need to specify additional program jars.
[2013-06-27 22:53:54 - ManGoHumor] Warning: there were 25 unresolved references to classes or interfaces.
[2013-06-27 22:53:54 - ManGoHumor] You may need to specify additional library jars (using '-libraryjars').
[2013-06-27 22:53:54 - ManGoHumor] Warning: there were 7 unresolved references to program class members.
[2013-06-27 22:53:54 - ManGoHumor] Your input classes appear to be inconsistent.
[2013-06-27 22:53:54 - ManGoHumor] You may need to recompile them and try again.
[2013-06-27 22:53:54 - ManGoHumor] Alternatively, you may have to specify the option
[2013-06-27 22:53:54 - ManGoHumor] '-dontskipnonpubliclibraryclassmembers'.
[2013-06-27 22:53:54 - ManGoHumor] java.io.IOException: Please correct the above warnings first.
[2013-06-27 22:53:54 - ManGoHumor] at proguard.Initializer.execute(Initializer.java:321)
[2013-06-27 22:53:54 - ManGoHumor] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-06-27 22:53:54 - ManGoHumor] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-06-27 22:53:54 - ManGoHumor] at proguard.ProGuard.main(ProGuard.java:492)