KSOP2 Librarary class exception not found

I used KSOP2 in my project and it has been working all these days. I recently bought a new machine and transferred my project to a new machine and imported the ksoap library for the project, etc. Etc., And when I try to run the application, I get the following error in the emulator

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

This is where the exception is thrown.

  SoapObject request = new SoapObject(namesapce, methodname); 

has something to do with 64-bit machines?

Why did the application that worked all these days suddenly stop working? Can someone enlighten me please. I am stuck in this. Thanks for your time in advance.

+1
source share
3 answers

I managed to solve the problem using

  • Creating the "libs" folder in the project
  • Copying external cans to a folder
  • Update folder
  • Go to Properties -> Build Path -> Add Jar (not external JAR)
  • Clear project
  • Restart Eclipse

Boom it worked for me. Hope this helps others too.

+3
source

I had a similar problem, I just forgot to check the kosoap2 library in the Java Build Path options, the Order and Export tab :)

+5
source

This may be due to the latest Android plugins and tools (r17). I read somewhere that external jar files need to be run through the dx --dex (due to the different binary format of Java binaries in Android), but this did not work for me. What I ended up with was adding the project as a source instead of the compiled binaries (by linking to the source from the project and adding it as the source folder.) That way, Eclipse builds it right and Android finds it at runtime.

+1
source

Source: https://habr.com/ru/post/886183/


All Articles