0

I have downloaded ksoap2-android-assembly-2.5.4-jar-with-dependencies which was downloaded as zip file.

When I add it to my project I get java.lang.NoClassDefFoundError. How can I add It as a jar file?

10x & have a good weekend

Udi Idan
  • 7,452
  • 9
  • 47
  • 80

6 Answers6

1

I really recommend that you look into maven, and use maven to get ksoap2. It's a bit of work getting maven set up, but well worth it!

uvesten
  • 3,331
  • 2
  • 26
  • 40
0

Turns out external jars such as

ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar

to be put under /libs folder so Eclipse ADT automatically adds your jars to the buildpath of your application. It was a buildpath missing defined class error after all.. I hope this will help you, too!

Solved here!!

Community
  • 1
  • 1
oikonomopo
  • 3,707
  • 7
  • 43
  • 65
0

Have you unzipped it into some directory? If so, RightClick on project name, click properties, Java Build Path, Add External Jar assuming you are using Eclipse

IamAlexAlright
  • 1,480
  • 1
  • 16
  • 29
  • If I unzip the file, I get 2 directories: "META-INF" and "org", but no jar file. I probably missed something about d/l these files. – Udi Idan Jul 08 '11 at 19:06
0

java -jar jarfilename ...... (this is used when your 'executable' is in the jarfile

but what you probably want is for the jarfile to be in your classpath

java -classpath jarfilename ......

- or -

java -cp jarfilename

KevinDTimm
  • 13,876
  • 3
  • 39
  • 59
0

change extension from zip to jar you downloaded the file and changed the extension when you "saved to" location

GriffiN
  • 84
  • 9
0

Follow the download instruction on the wiki and it will work. Really follow then though. Right click on View Raw File. More at

http://code.google.com/p/ksoap2-android/wiki/HowToUse?tm=2

Manfred Moser
  • 28,342
  • 13
  • 87
  • 120