Proguard Aws número 3

Tener un problema real tratando de implementar proguard para amazon s3, sigue fallando al cargar la aplicación en la línea 29, que es

s3Client = new AmazonS3Client(new BasicAWSCredentials( Constants.ACCESS_KEY_ID, Constants.SECRET_KEY)); 

Este es el rastro de la pila del error y no está seguro de lo que significa ser honesto cualquier forma de obtener un stacktrace mejor o cualquier sugerencia sobre cómo solucionarlo?

  Process: com.closr.closr, PID: 24517 java.lang.NoSuchFieldError: PUBLIC_ONLY at java.lang.Class.getDeclaredAnnotation(Native Method) at java.lang.Class.getAnnotation(Class.java:290) at com.bacfu$a.<clinit>(VisibilityChecker.java:172) at com.bacr<clinit>(ObjectMapper.java:195) at com.alaa<clinit>(Unknown Source) at com.aeacloadfrom(Unknown Source) at com.aeacload(Unknown Source) at com.aeac$a.<clinit>(Unknown Source) at com.aogetServiceName(Unknown Source) at com.accomputeServiceName(Unknown Source) at com.acgetServiceNameIntern(Unknown Source) at com.acconfigSigner(Unknown Source) at com.acsetEndpoint(Unknown Source) at com.ajaainit(Unknown Source) at com.ajaa<init>(Unknown Source) at com.ajaa<init>(Unknown Source) at com.closr.closr.MainApplication.onCreate(MainApplication.java:29) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328) at android.app.ActivityThread.access$1500(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) 

Aquí está mi proguard.cfg

 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose -dontoptimize -dontpreverify -dontwarn -keepattributes *Annotation*,Exceptions,InnerClasses,Signature,Deprecated, SourceFile,LineNumberTable,*Annotation*,EnclosingMethod -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService -keep public class org.apache.commons.** { *; } -keep public class * extends android.app.Application -keepnames class org.codehaus.jackson.** { *; } -keepclassmembers class com.amazonaws.** { *; } -keepclassmembers class com.closr.closr.** { public static <fields>; } -keepclasseswithmembernames class * { native <methods>; } -keepclassmembers public class * extends android.view.View { void set*(***); *** get*(); } -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 *; } -keepclassmembers class **.R$* { public static <fields>; } 

3 Solutions collect form web for “Proguard Aws número 3”

Siento que estés teniendo problemas Parece que no has intentado usar la configuración Proguard proporcionada en los ejemplos de AWS. Puede que todavía no solucione su problema, pero valdría la pena intentarlo. Si todavía no funciona podemos intentar ver a dónde ir desde allí, y al menos probablemente le dará un mejor rastro de la pila. Puede encontrarlo aquí: https://github.com/awslabs/aws-sdk-android-samples

Y la configuración proguard es ..

 # These options are the minimal options for a functioning application # using Proguard and the AWS SDK for Android -keep class org.apache.commons.logging.** { *; } -keep class com.amazonaws.services.sqs.QueueUrlHandler { *; } -keep class com.amazonaws.javax.xml.transform.sax.* { public *; } -keep class com.amazonaws.javax.xml.stream.** { *; } -keep class com.amazonaws.services.**.model.*Exception* { *; } -keep class com.amazonaws.internal.** { *; } -keep class org.codehaus.** { *; } -keep class org.joda.time.tz.Provider { *; } -keep class org.joda.time.tz.NameProvider { *; } -keepattributes Signature,*Annotation*,EnclosingMethod -keepnames class com.fasterxml.jackson.** { *; } -keepnames class com.amazonaws.** { *; } -dontwarn com.fasterxml.jackson.databind.** -dontwarn javax.xml.stream.events.** -dontwarn org.codehaus.jackson.** -dontwarn org.apache.commons.logging.impl.** -dontwarn org.apache.http.conn.scheme.** -dontwarn org.apache.http.annotation.** -dontwarn org.ietf.jgss.** -dontwarn org.joda.convert.** -dontwarn org.w3c.dom.bootstrap.** #SDK split into multiple jars so certain classes may be referenced but not used -dontwarn com.amazonaws.services.s3.** -dontwarn com.amazonaws.services.sqs.** -dontnote com.amazonaws.services.sqs.QueueUrlHandler 

Por favor, hágamelo saber si todavía le da problemas después de usar esto.

Gracias por ayudar a todos, fue una combinación de todos

 -dontoptimize -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose -ignorewarnings -keepdirectories -dontnote -keepattributes Exceptions,InnerClasses,Signature,Deprecated, SourceFile,LineNumberTable,*Annotation*,EnclosingMethod -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -libraryjars C:/Users/Hobbs/Closr/Closr/libs/aws-android-sdk-1.7.1.1.jar -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService -keep public class org.apache.commons.** { *; } -keep public class com.nostra13.universalimageloader.** { *; } -keep public class uk.co.senab.actionbarpulltorefresh.** { *; } -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.content.Context -keep public class * extends android.app.Activity -keep public class * extends android.support.v4.app.Activity -keep public class * extends android.app.Fragment -keep public class * extends android.support.v4.app.Fragment -keep class com.google.inject.** { *; } -keep class com.facebook.** { *; } -keep class android.os.** { *; } -keep class com.google.android.gms.maps.** { *; } -keep class com.google.android.gms.auth.** { *; } -keep class com.google.android.gms.common.** { *; } -keep class com.google.android.gms.location.** { *; } -keep class com.google.android.gms.gcm.** { *; } -keep class com.google.android.gms.internal.** { *; } -keep class com.google.android.finsky.utils.** { *; } -keep class com.amazonaws.services.sqs.QueueUrlHandler { *; } -keep class com.amazonaws.javax.xml.transform.sax.* { public *; } -keep class com.amazonaws.javax.xml.stream.** { *; } -keep class com.amazonaws.services.**.model.*Exception* { *; } -keep class org.codehaus.** { *; } -keep class javax.inject.** { *; } -keep class javax.annotation.** { *; } -keep class com.amazonaws.** { *; } -keep class org.joda.convert.* { *; } -keepnames class com.fasterxml.jackson.** { *; } -keep class com.closr.closr.** { *; } -keep interface com.closr.closr.** { *; } -keepclassmembers class com.closr.closr.** { public static <fields>; } -keepclasseswithmembernames class * { native <methods>; } -keepclassmembers public class * extends android.view.View { void set*(***); *** get*(); } -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 *; } -keepclassmembers class **.R$* { public static <fields>; } -dontwarn javax.xml.stream.events.** -dontwarn org.codehaus.jackson.** -dontwarn org.apache.commons.logging.impl.** -dontwarn org.apache.http.conn.scheme.** -dontwarn com.amazonaws.** 

Trate de añadir esto, (de acuerdo con las librerías que está utilizando).

 -libraryjars C:/workspace/3rd-libs/aws-android-sdk-1.5.0/lib/aws-android-sdk-1.5.0-core.jar -libraryjars C:/workspace/3rd-libs/aws-android-sdk-1.5.0/lib/aws-android-sdk-1.5.0-s3.jar -libraryjars C:/workspace/3rd-libs/aws-android-sdk-1.5.0/lib/aws-android-sdk-1.5.0-sdb.jar -keep class com.amazonaws.** { *; } -keep class org.apache.commons.logging.** { *; } -keep class com.amazonaws.services.sqs.QueueUrlHandler { *; } -keep class com.amazonaws.javax.xml.transform.sax.* { public *; } -keep class com.amazonaws.javax.xml.stream.** { *; } -keep class com.amazonaws.services.**.model.*Exception* { *; } -keep class org.codehaus.** { *; } -keepattributes Signature,*Annotation* -dontwarn javax.xml.stream.events.** -dontwarn org.codehaus.jackson.** -dontwarn org.apache.commons.logging.impl.** -dontwarn org.apache.http.conn.scheme.** 
  • Android proguard incompleto stacktrace
  • Proguard con la colección parametrizada orrmlite
  • Proguard convierte todos los enums en int o necesita ser configurado para este
  • ¿Es posible usar proguard en el modo de depuración?
  • Android obfuscate aplicación utilizando proguard mantiene obfuscating frascos de la biblioteca - o es?
  • Proguard e interfaces con el método predeterminado
  • Cómo bajar la versión proguard en androide gradle estudio?
  • Problema con proguardFile, null devuelto: 1
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.