java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapSerializationEnvelope

若如初见. 提交于 2019-11-27 08:19:10

问题


Hai am Calling the webservice in my android application am using android version(r-18).but i got error in Soap serilization.am trying the ksoap2 version(2.5.4,2.4,2.6.4,2.5.8).

Error Message;

05-07 02:20:26.920: W/dalvikvm(4852): threadid=1: thread exiting with uncaught exception (group=0x4001d888)
05-07 02:20:26.920: E/AndroidRuntime(4852): FATAL EXCEPTION: main
05-07 02:20:26.920: E/AndroidRuntime(4852): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapSerializationEnvelope
05-07 02:20:26.920: E/AndroidRuntime(4852):     at com.android.StringBuilderActivity.<init>(StringBuilderActivity.java:31)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at java.lang.Class.newInstanceImpl(Native Method)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at java.lang.Class.newInstance(Class.java:1429)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2582)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.ActivityThread.access$2300(ActivityThread.java:126)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2038)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.os.Looper.loop(Looper.java:123)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at android.app.ActivityThread.main(ActivityThread.java:4632)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at java.lang.reflect.Method.invokeNative(Native Method)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at java.lang.reflect.Method.invoke(Method.java:521)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
05-07 02:20:26.920: E/AndroidRuntime(4852):     at dalvik.system.NativeStart.main(Native Method)

回答1:


Change your library file names to "/libs" and check it.




回答2:


Starting with ADT version 17 I believe, Android dependencies are automatically gathered from the libs folder in the root of your project. Try moving your SOAP library to that folder and cleaning your project.




回答3:


I have encountered the same issue .... go to Build Path >> Configure Build Path >> Order and export >> Select KSOAP2 lib . (I am assuming that u have add KSOAP2 Jar)




回答4:


it seems like you forgot to add the external JAR file.

try right clicking you project folder, going to build path and adding the JAR file to the project.




回答5:


Create a directory named libs in your project

Now copy & paste your .jar file into libs directory.

Right click on project build path to add library

select from libs directory & ok

Run -> Success Enjoy



来源:https://stackoverflow.com/questions/10477632/java-lang-noclassdeffounderror-org-ksoap2-serialization-soapserializationenvelo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!