我做过很多项目都没有问题。但在当前项目中,我在三星 Galaxy Tab (GT-P7300) 上测试,应用程序无法启动。运行时屏幕闪烁,然后立即退出到主页(没有强制关闭消息,主屏幕立即弹出)。LogCat 显示以下错误:
03-14 16:18:41.060: E/AndroidRuntime(4144): Set to default setting_6 : region=-Duser.region=US propRegn=US
03-14 16:18:41.070: E/AndroidRuntime(4144): /system/csc/feature.xml ==> cannot open file
03-14 16:18:41.340: E/AndroidRuntime(4154): Set to default setting_6 : region=-Duser.region=US propRegn=US
03-14 16:18:41.360: E/AndroidRuntime(4154): /system/csc/feature.xml ==> cannot open file
消费者关闭输入通道或发生错误。通道已不可恢复地损坏,将被处理!
来自 LogCat 的其他消息:
03-14 15:16:40.370: E/TODmobile(650): onReceive action=sec.android.intent.action.HOME_RESUME
03-14 15:16:40.380: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:40.380: E/DigitalClockWidget(650): updateWidgets
03-14 15:16:40.410: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:40.450: E/DigitalClockWidget(650): onReceive action=sec.android.intent.action.HOME_RESUME
03-14 15:16:40.450: E/TODmobile(650): onStartCommand
03-14 15:16:40.450: E/TODmobile(650): onReceive action=com.sec.android.widgetapp.DigitalClock_Start
03-14 15:16:40.460: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:40.460: E/DigitalClockWidget(650): updateWidgets
03-14 15:16:40.510: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:40.980: E/TODmobile(650): onReceive action=sec.android.intent.action.HOME_RESUME
03-14 15:16:41.010: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.010: E/DigitalClockWidget(650): updateWidgets
03-14 15:16:41.010: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.030: E/DigitalClockWidget(650): onReceive action=sec.android.intent.action.HOME_RESUME
03-14 15:16:41.030: E/TODmobile(650): onStartCommand
03-14 15:16:41.040: E/TODmobile(650): onReceive action=com.sec.android.widgetapp.DigitalClock_Start
03-14 15:16:41.050: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.060: E/DigitalClockWidget(650): updateWidgets
03-14 15:16:41.060: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.410: E/DigitalClockWidget(650): onReceive action=com.sec.android.widgetapp.APPWIDGET_RESIZE
03-14 15:16:41.410: E/TODmobile(650): onStartCommand
03-14 15:16:41.420: E/TODmobile(650): onReceive action=com.sec.android.widgetapp.DigitalClock_Start
03-14 15:16:41.420: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.420: E/DigitalClockWidget(650): updateWidgets
03-14 15:16:41.420: E/TODmobile(650): hour : 15 minute : 16
03-14 15:16:41.570: E/RemoteViews(362): Cannot setOnClickPendingIntent for collection item (id: 2131755055)
03-14 15:16:41.570: E/RemoteViews(362): Cannot setOnClickPendingIntent for collection item (id: 2131755055)
该程序在 LG GT540 和三星 Ace 上运行良好。
是什么导致了这个问题?我搜索了错误信息,发现很多人都遇到过,但没有明确的解决方案。
编辑:更多信息,我在 Galaxy Tab(GT-P1000,运行 Android 2.3.3)上试过,它也很好用。当我在带有 3.0 设备的 Android SDK Emulator 上尝试它时,程序也会闪烁然后消失。所以只有 Android 3.0(可能也是 4.0)会抛出这个问题。