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

SuperFrog
  • 7,631
  • 9
  • 51
  • 81

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,365
  • 2
  • 27
  • 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
  • 4,025
  • 7
  • 44
  • 73
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,500
  • 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. – SuperFrog 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
  • 14,226
  • 3
  • 42
  • 60
0

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

GriffiN
  • 84
  • 10
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
  • 29,539
  • 13
  • 92
  • 123