当前位置:  开发笔记 > 编程语言 > 正文

Android:ActivityThread.performLaunchActivity错误

如何解决《Android:ActivityThread.performLaunchActivity错误》经验,为你挑选了1个好方法。

每次在调试器中启动程序时,我都会收到ActivityThread.performLaunchActivity(ActivityThread $ ActivityRecord,Intent)错误.该程序甚至不会启动!任何帮助将不胜感激!我对这种环境很新.如果您需要更多信息/代码来帮助我,请告诉我们.

这是我的logcat:

06-09 11:16:26.848: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
06-09 11:16:26.848: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
06-09 11:16:26.848: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
06-09 11:16:26.848: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
06-09 11:16:37.887: ERROR/MemoryHeapBase(53): error opening /dev/pmem: No such file or directory
06-09 11:16:37.887: ERROR/SurfaceFlinger(53): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
06-09 11:16:37.927: ERROR/libEGL(53): couldn't load  library (Cannot load library: load_library[984]: Library 'libhgl.so' not found)
06-09 11:16:38.407: ERROR/libEGL(64): couldn't load  library (Cannot load library: load_library[984]: Library 'libhgl.so' not found)
06-09 11:16:41.358: ERROR/BatteryService(53): Could not open '/sys/class/power_supply/usb/online'
06-09 11:16:41.367: ERROR/BatteryService(53): Could not open '/sys/class/power_supply/battery/batt_vol'
06-09 11:16:41.367: ERROR/BatteryService(53): Could not open '/sys/class/power_supply/battery/batt_temp'
06-09 11:16:41.667: ERROR/EventHub(53): could not get driver version for /dev/input/mouse0, Not a typewriter
06-09 11:16:41.667: ERROR/EventHub(53): could not get driver version for /dev/input/mice, Not a typewriter
06-09 11:16:41.797: ERROR/System(53): Failure starting core service
06-09 11:16:41.797: ERROR/System(53): java.lang.SecurityException
06-09 11:16:41.797: ERROR/System(53):     at android.os.BinderProxy.transact(Native Method)
06-09 11:16:41.797: ERROR/System(53):     at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
06-09 11:16:41.797: ERROR/System(53):     at android.os.ServiceManager.addService(ServiceManager.java:72)
06-09 11:16:41.797: ERROR/System(53):     at com.android.server.ServerThread.run(SystemServer.java:162)
06-09 11:16:41.797: ERROR/AndroidRuntime(53): Crash logging skipped, no checkin service
06-09 11:16:42.777: ERROR/LockPatternKeyguardView(53): Failed to bind to GLS while checking for account
06-09 11:16:46.557: ERROR/ActivityThread(111): Failed to find provider info for com.google.settings
06-09 11:16:46.577: ERROR/ActivityThread(111): Failed to find provider info for com.google.settings 
06-09 11:16:49.087: ERROR/ApplicationContext(53): Couldn't create directory for SharedPreferences file shared_prefs/wallpaper-hints.xml
06-09 11:16:51.146: ERROR/ActivityThread(108): Failed to find provider info for android.server.checkin
06-09 11:16:54.266: ERROR/ActivityThread(108): Failed to find provider info for android.server.checkin
06-09 11:16:54.416: ERROR/ActivityThread(108): Failed to find provider info for android.server.checkin
06-09 11:16:56.336: ERROR/MediaPlayerService(31): Couldn't open fd for content://settings/system/notification_sound
06-09 11:16:56.356: ERROR/MediaPlayer(53): Unable to to create media player
06-09 11:16:56.637: ERROR/AndroidRuntime(201): Uncaught handler: thread main exiting due to uncaught exception
06-09 11:16:56.757: ERROR/AndroidRuntime(201): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.svgeeks.kidneytest/com.svgeeks.kidneytest.KidneyTest}: java.lang.ClassCastException: android.widget.EditText
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.os.Looper.loop(Looper.java:123)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread.main(ActivityThread.java:4203)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at java.lang.reflect.Method.invokeNative(Native Method)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at java.lang.reflect.Method.invoke(Method.java:521)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at dalvik.system.NativeStart.main(Native Method)
06-09 11:16:56.757: ERROR/AndroidRuntime(201): Caused by: java.lang.ClassCastException: android.widget.EditText
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at com.svgeeks.kidneytest.KidneyTest.onCreate(KidneyTest.java:57)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
06-09 11:16:56.757: ERROR/AndroidRuntime(201):     ... 11 more
06-09 11:16:56.876: ERROR/dalvikvm(201): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

m6tt.. 13

你的问题出现在KidneyTest的第57行.

错误堆栈抱怨ClassCastException,当程序试图将对象强制转换为与其不兼容的类型时抛出.

看起来你正在尝试将EditText转换为不是它的东西.

编辑:解码错误堆栈的好提示,查找显示错误的行:此行将为您提供错误原因,下面的行将显示错误发生的位置,并包含行参考,以便您可以很容易找到问题.



1> m6tt..:

你的问题出现在KidneyTest的第57行.

错误堆栈抱怨ClassCastException,当程序试图将对象强制转换为与其不兼容的类型时抛出.

看起来你正在尝试将EditText转换为不是它的东西.

编辑:解码错误堆栈的好提示,查找显示错误的行:此行将为您提供错误原因,下面的行将显示错误发生的位置,并包含行参考,以便您可以很容易找到问题.

推荐阅读
黄晓敏3023
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有