Errores al utilizar Proguard y GoogleAdMobAdsSdk-6.0.1.jar (AdMob)

y gracias de antemano!

¡Lo intenté durante horas, 6 o más! Pero Proguard deja caer este mensaje de error, cada vez que intento generar una aplicación firmada/no firmada:


[2012-06-21 19:24:30 - SuperMarket] Proguard returned with error code 1. See console
[2012-06-21 19:24:30 - SuperMarket] Note: there were 2919 duplicate class definitions.
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g: can't find referenced method 'void setLayerType(int,android.graphics.Paint)' in class android.view.View
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g: can't find referenced method 'void setDisplayZoomControls(boolean)' in class android.webkit.WebSettings
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g$b: can't find referenced class android.webkit.WebResourceResponse
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g$b: can't find referenced class android.webkit.WebResourceResponse
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g$b: can't find referenced method 'android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView,java.lang.String)' in class com.google.ads.internal.i
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g$b: can't find referenced class android.webkit.WebResourceResponse
[2012-06-21 19:24:30 - SuperMarket] Warning: com.google.ads.util.g$b: can't find referenced class android.webkit.WebResourceResponse
[2012-06-21 19:24:30 - SuperMarket]       You should check if you need to specify additional program jars.
[2012-06-21 19:24:30 - SuperMarket] Warning: there were 4 unresolved references to classes or interfaces.
[2012-06-21 19:24:30 - SuperMarket]          You may need to specify additional library jars (using '-libraryjars').
[2012-06-21 19:24:30 - SuperMarket] Warning: there were 3 unresolved references to program class members.
[2012-06-21 19:24:30 - SuperMarket]          Your input classes appear to be inconsistent.
[2012-06-21 19:24:30 - SuperMarket]          You may need to recompile them and try again.
[2012-06-21 19:24:30 - SuperMarket]          Alternatively, you may have to specify the option 
[2012-06-21 19:24:30 - SuperMarket]          '-dontskipnonpubliclibraryclassmembers'.
[2012-06-21 19:24:30 - SuperMarket] Error: Please correct the above warnings first.

Lo he intentado con este proguard.cfg:


-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*

-injar C:\Users\Jordi\android-sdks\platforms\android-10\android.jar
-libraryjars C:\Users\Jordi\android-sdks\extras\google\admob_ads_sdk\GoogleAdMobAdsSdk-6.0.1.jar
-libraryjars C:\Users\Jordi\android-sdks\tools\support\annotations.jar

-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.view.View {
    public (android.content.Context);
    public (android.content.Context, android.util.AttributeSet);
    public (android.content.Context, android.util.AttributeSet, int);
    public void set*(...);
}

-keepclasseswithmembers class * {
    public (android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public (android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.content.Context {
   public void *(android.view.View);
   public void *(android.view.MenuItem);
}

-keepclassmembers class * implements android.os.Parcelable {
    static android.os.Parcelable$Creator CREATOR;
}

-keepclassmembers class **.R$* {
    public static ;
}

-keep public class com.google.ads.** { public protected *; }

y muchas otras combinaciones de injar/libraryjars! ¡Alguien sabe dónde puede estar el problema! ¡Cualquier comentario será muy apreciado!

Gracias de nuevo, y respetos !!

0
Probablemente llegue un poco tarde, pero el problema principal aquí son los duplicados de definición de clases que muy probablemente se derivan de las instrucciones de inibraryjars. Estas bibliotecas ya deben estar incluidas con su aplicación de Android, por lo que no es necesario agregarlas.
agregado el autor tiguchi, fuente
Tengo exactamente el mismo problema ... 5 horas en ... Si lo has resuelto, por favor comparte!
agregado el autor brandall, fuente

1 Respuestas

¿Has tratado de guardar todo el paquete?

-keep class com.google.ads ** {*; }

0
agregado