I am trying to connect my android client to gmail server using asmack android jar but I am getting a runtime error NoClassDefFoundError on ConnectionConfiguration. I am using the following code
ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com",5222,"gmail.com");
XMPPConnection connection= new XMPPConnection(config);
Even I use only XMPPConnection connection= new XMPPConnection("gmail.com"); it still throws NoClassDefFoundError on XMPPConnection.
asmack-android-5.jar file in the project. I have even tried to run this application using different smack jars but could not succeed. There is no build error but a runtime error and visible in eclipse DDMS. By da way I am using eclipse.
I have read the other thread but still not able to solve the problem.
Make sure you have a folder in your project called
libsand that the smack jar is in there. Android will automatically load libraries from thelibsfolder. The jars will automatically appear under “Android Dependencies” in your Eclipse project after refreshing.