0

I am running a sample of CognitoSyncDemo and when i run my code on my device, my device gives an error "Unfortunately, CognitoSyncDemo has stopped." and eclipse Logcat gives an Exception

java.lang.NoClassDefFoundError: com.amazonaws.auth.CognitoCachingCredentialsProvider

Well i have checked the library, I have included

aws-android-sdk-2.1.2-core.debug.jar extras/aws-android-sdk-2.1.2-cognito.debug.jar

and if there is any library missing then eclipse should have given any syntax error, but there was none and it was raised as an exception.

Please tell me what am i missing?

Regards, Muneeb

Muneeb Mirza
  • 810
  • 1
  • 17
  • 35

2 Answers2

1

NoClassDefFoundError occurs when required .class file missing at runtime (even it exists in project as library). Check your classpath.

How to solve java.lang.NoClassDefFoundError?
Why am I getting a NoClassDefFoundError in Java?

Community
  • 1
  • 1
Arif Ulusoy
  • 244
  • 2
  • 11
1

I assume you havent included the libraries in Libs folder. Include The sdks to the libs folder and hope your issue resolves.

  • Thanks! I added these libraries in Java Build Path which gave no syntax error but at runtime they gave an exception error. Adding them in Libs folder did the job. – Muneeb Mirza Oct 17 '14 at 07:13