本文介绍了java.lang.NoClassDefFoundError的:org.ksoap2.serialization.SoapObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到这个无级高清错误:org.ksoap2.serialization.SoapObject错误自从我已经更新的Eclipse ADT插件中和SDK管理器。我用ksoap2-机器人组装-2.4-JAR-与-dependencies.jar为KSOAP外部库。我想这可能是德precated所以我还添加了2.6.2版本,从here:http://$c$c.google.com/p/ksoap2-android/source/browse/m2-repo/com/google/$c$c/ksoap2-android/ksoap2-android-assembly/2.6.2/ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar

我仍然得到错误。我也搜索它通过该网站,但没有任何帮助。

请帮忙。

code:

  SoapServis SERVIS =新SoapServis(SoapServis.KULLANICI_KONTROL);
 

其中,构造函数是:

 公共SoapServis(字符串metodAdi){
    this.METHOD_NAME = metodAdi;
    this.Request =新SoapObject(命名空间METHOD_NAME);
}
 

解决方案

原来外部罐子,如

根据放在/库文件夹,这样的Eclipse ADT 自动将您的罐到应用程序的构建路径。这是一个构建路径毕竟缺少定义的类的错误。我希望这会帮助你,太!

穆斯塔法

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);
}
解决方案

Turns out external jars such as

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

这篇关于java.lang.NoClassDefFoundError的:org.ksoap2.serialization.SoapObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 00:35