gpt4 book ai didi

安卓:ActivityThread.performLaunchActivity 错误

转载 作者:太空宇宙 更新时间:2023-11-03 11:38:43 24 4
gpt4 key购买 nike

每次在调试器中启动我的程序时,我都会收到 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 转换为不是它的东西。

编辑:解码错误堆栈的好技巧,查找显示Caused by: 的行 此行将为您提供错误原因,下面的行将告诉您错误所在发生的情况,并将包括行引用,以便您可以轻松找到问题。

关于安卓:ActivityThread.performLaunchActivity 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3008745/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com