启动mainActivity时出现android错误

时间:2015-03-06 09:34:02

标签: android

我有一个启动画面和Handler我启动主要活动,但我在某些设备中给出了这个错误:

03-06 12:57:40.504  17203-17203/ir.spaad.app.khonak E/Trace﹕ error opening trace file: No such file or directory (2)
03-06 12:57:40.554  17203-17203/ir.spaad.app.khonak W/dalvikvm﹕ Refusing to reopen boot DEX '/system/framework/hwframework.jar'
03-06 12:57:40.734  17203-17203/ir.spaad.app.khonak W/System.err﹕ Invalid int: ""
03-06 12:57:41.014  17203-17203/ir.spaad.app.khonak I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.01.21.010_msm8625_JB_REL_2.0.3_Merge_release_AU (Merge)
    Build Date: 10/26/12 Fri
    Local Branch:
    Remote Branch: quic/jb_rel_2.0.3
    Local Patches: NONE
    Reconstruct Branch: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.01.21.010 +  NOTHING
03-06 12:57:42.244  17203-17203/ir.spaad.app.khonak W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d0b438)
03-06 12:57:42.374  17203-17232/ir.spaad.app.khonak E/dalvikvm﹕ GC_FOR_ALLOC freed 1941K, 20% free 11252K/13955K, paused 2ms+2ms, total 45ms
03-06 12:57:42.424  17203-17231/ir.spaad.app.khonak E/dalvikvm﹕ GC_FOR_ALLOC freed 1229K, 22% free 10923K/13955K, paused 5ms+2ms, total 30ms

我在splashScreen中的代码是:

new Handler().postDelayed(new Runnable() {
    @Override
    public void run() {
        startActivity(new Intent(App.context, MainActivity.class));
        finish();
    }
}, 1000);

min SDK:15 targetSdkVersion:21

1 个答案:

答案 0 :(得分:0)

我在惠威设备中发现了我的问题,因为启用日志必须通过以下步骤:

  1. 拨打#2846579#
  2. 选择'ProjectMenu'
  3. 选择'背景设置'
  4. 选择“日志设置”
  5. 选择“日志切换”
  6. 启用“登录”
  7. 选择“日志级别设置”
  8. 启用'DEBUG'
  9. 按“后退”键
  10. 选择'转储和记录'
  11. 启用“打开转储和日志”
  12. 按“返回”键5次返回主屏幕。
  13. 重新启动手机。
  14. LogCat现在可以正常工作。