dimanche 11 octobre 2015

Android AWS CognitoCachingCredentialsProvider crashes app in API 17 - JellyBean

I'm having a problem running my app on older versions of Android because i get an error when trying to instantiate CognitoCachingCredentialsProvider.

CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
                    this,  
                    this.getString(R.string.identity_pool_id),  
                    Regions.DEFAULT_REGION);  

This works on Lollipop 5.0, although it crashes my app on Jellybean 4.4.2 (API 17). I haven't tried other versions of Android yet because i need it to work on Jellybean and above.

Does anyone know why this would give me an error on Jellybean and not Lollipop? The code does not go to my try/catch block in Jellybean, instead it just kills the app and Logcat provides this error:

10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.271 1288-1288/? E/dalvikvm: Could not find class 'com.amazonaws.auth.CognitoCachingCredentialsProvider$1', referenced from method com.amazonaws.auth.CognitoCachingCredentialsProvider.<init>
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime: FATAL EXCEPTION: main
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime: java.lang.VerifyError: com/amazonaws/auth/CognitoCachingCredentialsProvider
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at au.appsprout.com.dropmap.Start.onCreate(Start.java:38)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1000)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4391)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.app.ActivityThread.access$1300(ActivityThread.java:141)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:137)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5041)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:511)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-12 05:48:53.283 1288-1288/? E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)




Aucun commentaire:

Enregistrer un commentaire