【发布时间】:2014-04-28 01:26:12
【问题描述】:
我创建项目使用 LocationClient(在 Google Play 服务中)
但是我在使用 groguard 导出发布时遇到了问题。我在这里添加了 proguard-config (http://developer.android.com/google/play-services/setup.html#Proguard)
但是导出的时候还是报错。谁能帮我说明这个问题。
[2014-04-28 08:10:14 - myProject] Proguard returned with error code 1. See console
[2014-04-28 08:10:14 - myProject] Note: there were 619 duplicate class definitions.
[2014-04-28 08:10:14 - myProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find superclass or interface android.app.Application$ActivityLifecycleCallbacks
[2014-04-28 08:10:14 - myProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find superclass or interface android.content.ComponentCallbacks2
[2014-04-28 08:10:14 - myProject] Warning: com.google.android.gms.analytics.GoogleAnalytics: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-28 08:10:14 - 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-28 08:10:14 - myProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-28 08:10:14 - myProject] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced field 'int smallestScreenWidthDp' in class android.content.res.Configuration
[2014-04-28 08:10:14 - 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-28 08:10:14 - myProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find referenced class android.content.ComponentCallbacks2
[2014-04-28 08:10:14 - 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-28 08:10:14 - 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-28 08:10:14 - 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-28 08:10:14 - myProject] Warning: com.google.android.gms.internal.cx: can't find referenced method 'void setMediaPlaybackRequiresUserGesture(boolean)' in class android.webkit.WebSettings
[2014-04-28 08:10:14 - 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-28 08:10:14 - 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-28 08:10:14 - myProject] You should check if you need to specify additional program jars.
[2014-04-28 08:10:14 - myProject] Warning: there were 5 unresolved references to classes or interfaces.
[2014-04-28 08:10:14 - myProject] You may need to specify additional library jars (using '-libraryjars').
[2014-04-28 08:10:14 - myProject] Warning: there were 9 unresolved references to program class members.
[2014-04-28 08:10:14 - myProject] Your input classes appear to be inconsistent.
[2014-04-28 08:10:14 - myProject] You may need to recompile them and try again.
[2014-04-28 08:10:14 - myProject] Alternatively, you may have to specify the option
[2014-04-28 08:10:14 - myProject] '-dontskipnonpubliclibraryclassmembers'.
[2014-04-28 08:10:14 - myProject] java.io.IOException: Please correct the above warnings first.
[2014-04-28 08:10:14 - myProject] at proguard.Initializer.execute(Initializer.java:321)
[2014-04-28 08:10:14 - myProject] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-04-28 08:10:14 - myProject] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-04-28 08:10:14 - myProject] at proguard.ProGuard.main(ProGuard.java:492)
谢谢一百万!
【问题讨论】:
-
谢谢大家,我得到了:-dontwarn com.google.android.gms.**
标签: android export proguard google-play-services