如何识别logcat中的错误

时间:2012-02-14 12:48:37

标签: android android-logcat

我在logcat中有一些错误,但我不知道如何识别它。请帮我找出这个问题。运行模拟器后,我的系统崩溃了。我不知道我的项目中有什么错误。

提前致谢。

02-14 16:45:44.527: D/dalvikvm(562): Not late-enabling CheckJNI (already on)
02-14 16:45:46.407: I/ActivityThread(562): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider
02-14 16:45:46.417: D/AndroidRuntime(562): Shutting down VM
02-14 16:45:46.417: W/dalvikvm(562): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-14 16:45:46.487: E/AndroidRuntime(562): FATAL EXCEPTION: main
02-14 16:45:46.487: E/AndroidRuntime(562): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.installProvider(ActivityThread.java:4240)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.installContentProviders(ActivityThread.java:3992)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3946)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.access$1300(ActivityThread.java:123)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.os.Looper.loop(Looper.java:137)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-14 16:45:46.487: E/AndroidRuntime(562):  at java.lang.reflect.Method.invokeNative(Native Method)
02-14 16:45:46.487: E/AndroidRuntime(562):  at java.lang.reflect.Method.invoke(Method.java:511)
02-14 16:45:46.487: E/AndroidRuntime(562):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-14 16:45:46.487: E/AndroidRuntime(562):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-14 16:45:46.487: E/AndroidRuntime(562):  at dalvik.system.NativeStart.main(Native Method)
02-14 16:45:46.487: E/AndroidRuntime(562): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider
02-14 16:45:46.487: E/AndroidRuntime(562):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
02-14 16:45:46.487: E/AndroidRuntime(562):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-14 16:45:46.487: E/AndroidRuntime(562):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-14 16:45:46.487: E/AndroidRuntime(562):  at android.app.ActivityThread.installProvider(ActivityThread.java:4225)
02-14 16:45:46.487: E/AndroidRuntime(562):  ... 12 more
02-14 16:46:16.637: I/Process(562): Sending signal. PID: 562 SIG: 9
02-14 17:00:46.667: I/ActivityThread(644): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider
02-14 17:00:46.667: D/AndroidRuntime(644): Shutting down VM
02-14 17:00:46.717: W/dalvikvm(644): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-14 17:00:46.727: E/AndroidRuntime(644): FATAL EXCEPTION: main
02-14 17:00:46.727: E/AndroidRuntime(644): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.installProvider(ActivityThread.java:4240)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.installContentProviders(ActivityThread.java:3992)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3946)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.access$1300(ActivityThread.java:123)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.os.Looper.loop(Looper.java:137)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-14 17:00:46.727: E/AndroidRuntime(644):  at java.lang.reflect.Method.invokeNative(Native Method)
02-14 17:00:46.727: E/AndroidRuntime(644):  at java.lang.reflect.Method.invoke(Method.java:511)
02-14 17:00:46.727: E/AndroidRuntime(644):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-14 17:00:46.727: E/AndroidRuntime(644):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-14 17:00:46.727: E/AndroidRuntime(644):  at dalvik.system.NativeStart.main(Native Method)
02-14 17:00:46.727: E/AndroidRuntime(644): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider
02-14 17:00:46.727: E/AndroidRuntime(644):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
02-14 17:00:46.727: E/AndroidRuntime(644):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-14 17:00:46.727: E/AndroidRuntime(644):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-14 17:00:46.727: E/AndroidRuntime(644):  at android.app.ActivityThread.installProvider(ActivityThread.java:4225)
02-14 17:00:46.727: E/AndroidRuntime(644):  ... 12 more
02-14 17:09:00.347: I/ActivityThread(692): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider
02-14 17:09:00.437: D/AndroidRuntime(692): Shutting down VM
02-14 17:09:00.437: W/dalvikvm(692): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-14 17:09:00.457: E/AndroidRuntime(692): FATAL EXCEPTION: main
02-14 17:09:00.457: E/AndroidRuntime(692): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{polito.mailandroid.ui/polito.mailandroid.ui.ui.LoginUI}: java.lang.ClassNotFoundException: polito.mailandroid.ui.ui.LoginUI
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.os.Looper.loop(Looper.java:137)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-14 17:09:00.457: E/AndroidRuntime(692):  at java.lang.reflect.Method.invokeNative(Native Method)
02-14 17:09:00.457: E/AndroidRuntime(692):  at java.lang.reflect.Method.invoke(Method.java:511)
02-14 17:09:00.457: E/AndroidRuntime(692):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-14 17:09:00.457: E/AndroidRuntime(692):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-14 17:09:00.457: E/AndroidRuntime(692):  at dalvik.system.NativeStart.main(Native Method)
02-14 17:09:00.457: E/AndroidRuntime(692): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ui.LoginUI
02-14 17:09:00.457: E/AndroidRuntime(692):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
02-14 17:09:00.457: E/AndroidRuntime(692):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-14 17:09:00.457: E/AndroidRuntime(692):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
02-14 17:09:00.457: E/AndroidRuntime(692):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
02-14 17:09:00.457: E/AndroidRuntime(692):  ... 11 more

7 个答案:

答案 0 :(得分:1)

找不到课程polito.mailandroid.ui.ui.LoginUIpolito.mailandroid.ui.ElementProvider。您应该检查.apk和您的构建脚本以包含它们。

答案 1 :(得分:1)

它的类未找到异常。

确保您使用的课​​程是否存在,并在特定活动的清单中输入。

答案 2 :(得分:1)

错误是

02-14 17:00:46.727: E/AndroidRuntime(644): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider

您是否忘记在AndroidManifest.xml中声明您的ContentProvider?

答案 3 :(得分:1)

您正面临未处理的RuntimeException。它是Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider,因为很可能你没有在Manifest文件中定义它

答案 4 :(得分:1)

您正面临此错误,请参阅

02-14 16:45:46.487: E/AndroidRuntime(562): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider

答案 5 :(得分:1)


这似乎是java新手。阅读有关java的Exception,它将帮助。暂时查找包含包或文件名称的错误,并阅读引发错误。

答案 6 :(得分:0)

即来自Logcat的错误

  

引起:java.lang.ClassNotFoundException:polito.mailandroid.ui.ElementProvider
  02-14 16:45:46.487:E / AndroidRuntime(562):at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)