我希望关注google关于admob的新指令并更新我的程序。如果在设备上测试,它可以正常工作。当我导出到APK。控制台有一些警告和错误代码1.我试图改变proguard设置,但无法解决。谁可以给我一点想法?
以下是proguard.cfg设置:
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-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, 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 *;
}
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
-keep public class com.google.android.gms.ads.** {
public *;
}
-keep public class com.google.ads.** {
public *;
}
以下是来自控制台的错误消息:
[2014-10-10 10:49:58 - admobTestingApp] Proguard returned with error code 1. See console
[2014-10-10 10:49:58 - admobTestingApp] Warning: com.google.android.gms.common.SupportErrorDialogFragment: can't find referenced method 'void setShowsDialog(boolean)' in class com.google.android.gms.common.SupportErrorDialogFragment
[2014-10-10 10:49:58 - admobTestingApp] Warning: com.google.android.gms.common.api.d: can't find referenced method 'android.support.v4.app.FragmentActivity getActivity()' in class com.google.android.gms.common.api.d
[2014-10-10 10:49:58 - admobTestingApp] You should check if you need to specify additional program jars.
[2014-10-10 10:49:58 - admobTestingApp] Warning: there were 2 unresolved references to program class members.
[2014-10-10 10:49:58 - admobTestingApp] Your input classes appear to be inconsistent.
[2014-10-10 10:49:58 - admobTestingApp] You may need to recompile them and try again.
[2014-10-10 10:49:58 - admobTestingApp] Alternatively, you may have to specify the option
[2014-10-10 10:49:58 - admobTestingApp] -dontskipnonpubliclibraryclassmembers.
[2014-10-10 10:49:58 - admobTestingApp] java.io.IOException: Please correct the above warnings first.
[2014-10-10 10:49:58 - admobTestingApp] at proguard.Initializer.execute(Initializer.java:321)
[2014-10-10 10:49:58 - admobTestingApp] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-10-10 10:49:58 - admobTestingApp] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-10-10 10:49:58 - admobTestingApp] at proguard.ProGuard.main(ProGuard.java:492)
感谢您的帮助!