由于我是Android的新手我对找到错误有疑问。如果我运行我的应用程序错误来自设备说应用程序已停止运行强制关闭。如果我在logcat中看到错误它显示我的错误的链接。但我想要的是知道错误是什么。 Logcat重定向到发生错误的行但我无法知道错误。如何确切地知道错误是什么。任何人都可以帮我解决..!
这是我认为的logcat错误soap对象序列化问题
10-22 09:38:29.194: D/dalvikvm(298): VFY: replacing opcode 0x22 at 0x0016
10-22 09:38:29.194: D/dalvikvm(298): VFY: dead code 0x0018-0072 in Lcom/retailer/client/RetailerActivity;.onCreate (Landroid/os/Bundle;)V
10-22 09:38:29.274: I/System.out(298): urn:training/
10-22 09:38:29.274: I/System.out(298): searchCompanyInfo
10-22 09:38:29.274: D/AndroidRuntime(298): Shutting down VM
10-22 09:38:29.304: W/dalvikvm(298): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-22 09:38:29.314: E/AndroidRuntime(298): FATAL EXCEPTION: main
10-22 09:38:29.314: E/AndroidRuntime(298): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
10-22 09:38:29.314: E/AndroidRuntime(298): at com.retailer.client.RetailerActivity.onCreate(RetailerActivity.java:24)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 09:38:29.314: E/AndroidRuntime(298): at android.os.Looper.loop(Looper.java:123)
这是什么错误?
10-22 11:21:28.794: D/AndroidRuntime(3285): Shutting down VM
10-22 11:21:28.824: W/dalvikvm(3285): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-22 11:21:28.854: E/AndroidRuntime(3285): FATAL EXCEPTION: main
10-22 11:21:28.854: E/AndroidRuntime(3285): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidlogin.androidmysql/com.androidlogin.androidmysql.MainActivity}: java.lang.ClassNotFoundException: com.androidlogin.androidmysql.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.androidlogin.androidmysql-1.apk]
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.os.Looper.loop(Looper.java:123)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread.main(ActivityThread.java:4627)
10-22 11:21:28.854: E/AndroidRuntime(3285): at java.lang.reflect.Method.invokeNative(Native Method)
10-22 11:21:28.854: E/AndroidRuntime(3285): at java.lang.reflect.Method.invoke(Method.java:521)
10-22 11:21:28.854: E/AndroidRuntime(3285): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-22 11:21:28.854: E/AndroidRuntime(3285): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-22 11:21:28.854: E/AndroidRuntime(3285): at dalvik.system.NativeStart.main(Native Method)
10-22 11:21:28.854: E/AndroidRuntime(3285): Caused by: java.lang.ClassNotFoundException: com.androidlogin.androidmysql.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.androidlogin.androidmysql-1.apk]
10-22 11:21:28.854: E/AndroidRuntime(3285): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
10-22 11:21:28.854: E/AndroidRuntime(3285): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
10-22 11:21:28.854: E/AndroidRuntime(3285): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-22 11:21:28.854: E/AndroidRuntime(3285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-22 11:21:28.854: E/AndroidRuntime(3285): ... 11 more
答案 0 :(得分:1)
我已通过以下步骤修复了此错误。
解决方案: -
我在YouTube的帮助下找到了这些步骤。 这是链接: -
答案 1 :(得分:0)
如果你使用eclipse,去项目属性,然后建立路径顺序和导出选项卡选择你的罐子