Exception when using ksoap2-android
I have a problem with ksoap2. My problem is that the project worked well until the time I had to format my computer and set it up again.
I don't remember which version I referenced in my application, but I tried many of them and the problem still occurs.
04-05 13:56:18.289: E/dalvikvm(495): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method com.giatrosofia.Activity_Votana$ConnectAndGetLst.doInBackground
04-05 13:56:18.289: W/dalvikvm(495): VFY: unable to resolve new-instance 223 (Lorg/ksoap2/serialization/SoapObject;) in Lcom/giatrosofia/Activity_Votana$ConnectAndGetLst;
04-05 13:56:18.289: D/dalvikvm(495): VFY: replacing opcode 0x22 at 0x0000
04-05 13:56:29.627: W/dalvikvm(495): threadid=9: thread exiting with uncaught exception (group=0x40014760)
04-05 13:56:29.809: E/AndroidRuntime(495): FATAL EXCEPTION: AsyncTask #1
04-05 13:56:29.809: E/AndroidRuntime(495): java.lang.RuntimeException: An error occured while executing doInBackground()
04-05 13:56:29.809: E/AndroidRuntime(495): at android.os.AsyncTask$3.done(AsyncTask.java:266)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
04-05 13:56:29.809: E/AndroidRuntime(495): at java.lang.Thread.run(Thread.java:1020)
04-05 13:56:29.809: E/AndroidRuntime(495): Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
The linked file is ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar and the expression happened in
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
Here are the links to the jar files
Have I missed some of them?
source to share
You can try adding KSOAP2 to the Order & Export tab. To do this:
01- Right click your project name
02- Click Properties
03- Select Java Build Path
04- Check if the KSOAP library is already in the Libraries tab
05. Go to the Order and Export tab and check the box next to the ksoap2 build- android.
Export your project again and try. It should now work.
source to share