Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

android - java.lang.noclassdeffounderror: org.ksoap2.serialization.SoapObject

I got this no class def error: org.ksoap2.serialization.SoapObject error ever since I have updated Eclipse ADT Plug in and SDK Manager. I was using ksoap2-android-assembly-2.4-jar-with-dependencies.jar as external library for KSOAP. I thought that may be deprecated so i also added 2.6.2 version from here:http://code.google.com/p/ksoap2-android/source/browse/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/2.6.2/ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar

I still get the error. I have also search for it through the site but nothing helped.

Please help.

Code:

SoapServis servis = new SoapServis(SoapServis.KULLANICI_KONTROL);

where constructor is:

public SoapServis(String metodAdi) {
    this.METHOD_NAME = metodAdi;
    this.Request = new SoapObject(NAMESPACE, METHOD_NAME);
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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!

Mustafa


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...