Search code examples
javaandroidexceptionksoap2android-ksoap2

KSOP2 Librarary class not found exception


I've used KSOP2 in my project and it worked all these days. Recently I bought a new machine and moved my project to new machine and imported the ksoap library to project etc etc and when I try to run the application I get following error in the emulator

Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject

this is the place where exception is thrown.

 SoapObject request = new SoapObject(namesapce, methodname);

has is something to do with 64 bit machines??

How come the app that worked all these days stopped working all of a sudden?? Can someone enlighten me please. I'm stuck with this. Thanks for your time in advance.


Solution

  • I managed to solve the problem by

    1. Creating a folder "libs" in the project
    2. Copying the external jars in to the folder
    3. Refresh the folder
    4. Go to properties -> Build path -> Add Jar (not external JAR)
    5. Clean the project
    6. Restart Eclipse

    Boom it worked for me. Hope it'll help others too.