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

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

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

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?

Related

How can I get cardslib into eclipse

hope someone knows better.
Since hours I try to include the cardslib - https://github.com/gabrielemariotti/cardslib, unfortunately without success.
When I want to including as it's described in the https://github.com/gabrielemariotti/cardslib/blob/master/doc/BUILD.md#reference-this-project-as-a-library-in-eclipse.
When I want to load the lib into the workspace the Error "An internal error occurred during: "Adjusting Android Project Classpath".
Source attachment path 'C:\Users\User\android-sdks\sources\android-14' for IClasspathEntry must be absolute" appears.
I never had such an error before. What causes it?
After pressing "OK" the lib gets into the workspace and "cardslib] Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 14" is shown on the console. So the lib is marked with an error.
After getting through the document (mark as lib etc. in properties) I still get some errors:
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
BuildConfig.java /cardslib/gen/it/gmariotti/cardslib/library/cards line 1 Java Problem
error: Error retrieving parent for item: No resource found that matches the given name 'card.native'.
styles.xml /cardslib/res/values line 23 Android AAPT Problem
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project cardslib Unknown Java Problem
I asked google about it already but didn't find a match so I hope someone can help me out.
Thanks in advance.

android doesn't recognise Resources folder after cleaning the project

Hi I had some errors on my project and tried to clean it but after that now all of my files do not recognise anything that it has to do with the Resources folder. What can I do ? I have more than 20 files with errors now. Please help. Any advice would me much appreciated. Thanks.
An error in one of your resource files will cause R to not get built. That in turn will cause an error in your Java code everywhere a reference to it is made. You may or may not see the error reported in the "Problems" and/or the "Console" windows.

Dalvik format failed with error 1 on ServerAssistant

I Found this Error "Conversion to Dalvik format failed with error 1" While I Compile ServerAssistant On Eclipse
This is the download link to my modifications project
"http://www.4shared.com/file/fXNDNs5A/ServerAssistant.html"
I have tried cleaning the project and looking at all the other solution to the problem on this website. Has someone also found some obscure solution to this error?
this error you got because the library which you have added in the project it was conflict with another class or library, may be the another library or class which was already added into the project. check the complete error and library which you have added into the project

Android error not visible

When I attempt to run my Android application I get the following message:
your project contains error(s), please fix them before running your application
All I did was to clean the application and everything went wrong.
Normally, you would see a red asterisk against the offending file and the corresponding line with the error. But in this case I get no such indication.
Screenshots:
Sounds like you have a syntax error in one of your XML files, or an invalid file name.
When you do a clean it deletes certain files, it would then automatically build, if you have syntax errors the R.java file won't be generated and you will have the above error.
you can check in android console(window->show view->console),it will give some more information,check it once,check your build path if your are import your project somewhere else and the project uses 3rd party libraries or you may have problems with your XML resources.
Found the source of my mysterious error.
It turns out it was a imported java class I had forgotten about which I wasn't using and caused the error to showup when I "cleaned" the project.
I visited the build path where I saw it had an associated error. I removed it and all was well.

Conversion to Dalvik format failed with error 1 when integrating ZXing source Code

I am getting "Conversion to Dalvik format failed with error 1" when integrating ZXing source Code to my application. I just downloaded ZXing source for Android and imported in my Eclipse which gives lot of compilation errors and also Dalvik error. can anyone tell me how to solve this issue?
Thanks in Advance
I was having the same issue until I realized my mistake. I didn't include the core jar from the ZXing project. After that I didn't get the Dalvik error anymore.
In my case the issue was originated after updating Eclipse and ADT in March 2011.
In my project I am using a JAR which was producing issues to rebuild and none of the former solutions worked. It took me some days to try all , search up&down with no satisfying solution.
Apparently there was a double reference to the .jar file.
Finally I :
removed any references from the libraries,
deleted the physical file form within the application.
got the .jar (located in a different directory outside of the project) using "Add External Jars"
performed a project "clean",
update references into the module calling the jar with (ctrl)+(shift)+O
and it did finally compile.
Hi
In order to solve this Dalvik error,we need to create separate workspace in eclipse and build the app there. There is no reason why should it be done like that , but it worked for me.
Kill the adb server and restart it.

Categories

Resources