質問

I'm experimenting problems to sign my app using ProGuard and the new AdMob library (Google Play Services Lib Project)

Console is giving me these errors:

[2014-04-26 16:41:33 - MyProject] Proguard returned with error code 1. See console
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find superclass or interface android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find superclass or interface android.content.ComponentCallbacks2
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics: can't find referenced method 'void registerActivityLifecycleCallbacks(android.app.Application$ActivityLifecycleCallbacks)' in class android.app.Application
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager: can't find referenced method 'void registerComponentCallbacks(android.content.ComponentCallbacks)' in class android.content.Context
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find referenced class android.content.ComponentCallbacks2
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.a: can't find referenced method 'android.graphics.drawable.Drawable[] getCompoundDrawablesRelative()' in class android.widget.TextView
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.a: can't find referenced method 'void setCompoundDrawablesRelativeWithIntrinsicBounds(android.graphics.drawable.Drawable,android.graphics.drawable.Drawable,android.graphics.drawable.Drawable,android.graphics.drawable.Drawable)' in class android.widget.TextView
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.cx: can't find referenced method 'java.lang.String getDefaultUserAgent(android.content.Context)' in class android.webkit.WebSettings
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.cx: can't find referenced method 'void setMediaPlaybackRequiresUserGesture(boolean)' in class android.webkit.WebSettings
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.gd$b: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.gd$b: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver
[2014-04-26 16:41:33 - MyProject]       You should check if you need to specify additional program jars.
[2014-04-26 16:41:33 - MyProject] Warning: there were 5 unresolved references to classes or interfaces.
[2014-04-26 16:41:33 - MyProject]          You may need to specify additional library jars (using '-libraryjars').
[2014-04-26 16:41:33 - MyProject] Warning: there were 8 unresolved references to program class members.
[2014-04-26 16:41:33 - MyProject]          Your input classes appear to be inconsistent.
[2014-04-26 16:41:33 - MyProject]          You may need to recompile them and try again.
[2014-04-26 16:41:33 - MyProject]          Alternatively, you may have to specify the option 
[2014-04-26 16:41:33 - MyProject]          '-dontskipnonpubliclibraryclassmembers'.
[2014-04-26 16:41:33 - MyProject] java.io.IOException: Please correct the above warnings first.
[2014-04-26 16:41:33 - MyProject]   at proguard.Initializer.execute(Initializer.java:321)
[2014-04-26 16:41:33 - MyProject]   at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-04-26 16:41:33 - MyProject]   at proguard.ProGuard.execute(ProGuard.java:86)
[2014-04-26 16:41:33 - MyProject]   at proguard.ProGuard.main(ProGuard.java:492)

I can't find any way to solve this on internet.

役に立ちましたか?

解決

maybe you should add this to your proguard.txt :

-dontwarn com.google.android.gms.**

good luck.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top