powered by Jive Software

aSmack 4.0.0 dependencies

Hello Guys,

I just migrated my code to version 4.0.0 but, uppon launch i’m getting warnings for each and every method i’m using on smack for example:

W/dalvikvm(14168): VFY: unable to resolve static method 14306: Lorg/jivesoftware/smack/SmackAndroid;.init (Landroid/content/Context;)Lorg/jivesoftware/smack/SmackAndroid;

Finally, I’m getting fatal exception: java.lang.NoClassDefFoundError: org.jivesoftware.smack.SmackAndroid

It didn’t happen in previous version and I think I did everything according to doc - i.e put those 2 jars in my project’s libs folder:



obviously something else is missing…

your help is realy realy appriciated.

Thank you


I suggest you add the provided sources zip to your IDE setup to examine the aSmack source. This will help you to identify the code changes.

For example SmackAndroid has no longer a static init method.

well ,I meet the same problem,and I try every suggestion that I can find on the Internet to add third parth Jar to APK,but not work。And Finaly ,I update my ADT plugin to the latest 23.0,and as well the SDK tools,platform tools,and build-tools to the latest version,with luck,it work then。I think this reason is ADT version,google maybe change something the build apk 。Hope that will help U

Flow & Rike Thank you,

Only thing that helped me was to totally replace the adt. I downloaded the latest ADT bundle from: http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20140702.zip

and used that instead of updating my current environment. So Rike - you gave me good direction to solve this voodoo

Flow - I’m a little bit confused because of what you wrote because, there is a static init(Context) method in SmackAndroid in the latest version and it is also mentioned in the readme that I must use it so… can you elaborate what exactly did you mean? I’m sure it will help lot’s of programmer that are migrating to the new version.

What is the replacement for using SmackAndroid.init? I cannot connect to my server and I think my initialization is probably not correct anymore…

Flow - I’m a little bit confused because of what you wrote because,
I mixed things up. There is a static init(Context) method in SmackAndroid. Sorry for that. The aSmack readme is correct.