Saturday, June 8, 2013

java.lang.NoClassDefFoundError - Android Development

Given that you have exported an existing project and try to run your android project via an emulator or your mobile phone,  and it seems to work just fine meaning that there is no compile time error or something and UI seems ok.  However when you click a button on the screen, suddenly you get such an error : "java.lang.NoClassDefFoundError in Android Development"

Do not worry ! There is always a reason behind the problem :)  It is actually about one of your jar files which cannot be found on runtime while JVM can find it in compile time.  If you are sure that your x.jar file is properly imported in your project in terms of its path, then there is one more thng you need to check.

 Ok our jar file seems ok, no error mark or something makes us guilty around our jar file :)
Then you should go to "Order and Export" tab as well.  And make sure that your jar file "BioHarnessBT.jar" in this case is checked !  If it is checked , run it and enjoy the result :)  and let all stress go away :)

No comments:

Post a Comment