Android:ActivityThread.performLaunchActivity 错误

2023-12-11

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

这是我的日志猫:

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 <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found)
06-09 11:16:38.407: ERROR/libEGL(64): couldn't load <libhgl.so> 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

您的问题位于 KidneyTest 的第 57 行。

错误堆栈抱怨 ClassCastException,当程序尝试将对象转换为与其不兼容的类型时抛出该异常。

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

编辑:解码错误堆栈的好提示,查找显示的行造成原因:此行将为您提供错误原因,下面的行将显示错误发生的位置,并包含行引用,以便您可以轻松找到问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android:ActivityThread.performLaunchActivity 错误 的相关文章

随机推荐