我的应用程序适用于两种不同的手机,但它不再适用于模拟器。我立即在模拟器上得到意外停止的错误。我重新启动了我的电脑,并没有改变它。我很有智慧!
调试器显示:
Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2663
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679
ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 868
ZygoteInit.main(String[]) line: 626
NativeStart.main(String[]) line: not available [native method]
答案 0 :(得分:1)
我发现了我的问题,它与手机与模拟器无关。我以为我正确使用了logcat,但事实并非如此。感谢我的建议,我再次尝试,它引导我解决我的问题。