我将根据此链接http://jatin4rise.wordpress.com/2010/10/03/webservicecallfromandroid/从android使用网络服务,但在运行时,我的android应用[AndroidFrontend]显示为
抱歉!。
应用程序AndroidFrontend(process.org.web.android.frontend)意外停止,请稍后再试。
和logcat显示为
LOGCAT
05-14 11:13:55.133: E/dalvikvm(208): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method org.web.android.frontend.AndroidFrontendActivity.onCreate
05-14 11:13:55.133: W/dalvikvm(208): VFY: unable to resolve new-instance 25 (Lorg/ksoap2/serialization/SoapObject;) in Lorg/web/android/frontend/AndroidFrontendActivity;
05-14 11:13:55.133: D/dalvikvm(208): VFY: replacing opcode 0x22 at 0x0010
05-14 11:13:55.163: D/dalvikvm(208): VFY: dead code 0x0012-0081 in Lorg/web/android/frontend/AndroidFrontendActivity;.onCreate (Landroid/os/Bundle;)V
05-14 11:13:55.224: D/AndroidRuntime(208): Shutting down VM
05-14 11:13:55.224: W/dalvikvm(208): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-14 11:13:55.233: E/AndroidRuntime(208): FATAL EXCEPTION: main
05-14 11:13:55.233: E/AndroidRuntime(208): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
05-14 11:13:55.233: E/AndroidRuntime(208): at org.web.android.frontend.AndroidFrontendActivity.onCreate(AndroidFrontendActivity.java:28)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.os.Looper.loop(Looper.java:123)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-14 11:13:55.233: E/AndroidRuntime(208): at java.lang.reflect.Method.invokeNative(Native Method)
05-14 11:13:55.233: E/AndroidRuntime(208): at java.lang.reflect.Method.invoke(Method.java:521)
05-14 11:13:55.233: E/AndroidRuntime(208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-14 11:13:55.233: E/AndroidRuntime(208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-14 11:13:55.233: E/AndroidRuntime(208): at dalvik.system.NativeStart.main(Native Method)
伙计们,据我所知,我已经在这些问题上进行了搜索,但仍在寻找解决方案。如果您有,请告诉我解决方案。
感谢您的宝贵时间!
最佳答案
VM无法找到类org.ksoap2.serialization.SoapObject
。
确保在构建项目时包括所需的库(JAR文件)。