Erros usando o Proguard e o GoogleAdMobAdsSdk-6.0.1.jar (AdMob)

e obrigado antecipadamente!

Eu tentei por horas, 6 ou mais! Mas o Proguard está soltando essa mensagem de erro, cada vez que eu tento gerar um apk assinado/não assinado:


[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.

Eu tentei com 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 *; }

e muitas outras combinações de injar/libraryjars! Alguém sabe onde pode estar o problema! Qualquer feedback será muito apreciado!

Mais uma vez obrigado e considera !!

0
adicionado
Visualizações: 1
Eu estou provavelmente um pouco atrasado, mas o principal problema aqui são os duplicados de definição de classe que provavelmente provêm das instruções do -inlibraryjars. Essas bibliotecas já devem estar incluídas no seu aplicativo para Android, portanto, não é necessário adicioná-las.
adicionado o autor tiguchi, fonte
Eu tenho exatamente o mesmo problema ... 5 horas em ... Se você resolveu, por favor, compartilhe!
adicionado o autor brandall, fonte

1 Respostas

Você já tentou manter todo o pacote?

-classe classe com.google.ads ** {*; }

0
adicionado