你我渐行渐远
2017-03-20 16:24
采纳率: 66.7%
浏览 2.8k

Apk在模拟器正常,真机崩溃

模拟器中是安卓5.0的系统,sdk也为21,真机是5.0
在genymotion可以运行,真机安装后一打开就崩溃。

部分Logcat输出:

03-20 12:24:02.568 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 127 frames!  The application may be doing too much work on its main thread.
03-20 12:24:08.257 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 339 frames!  The application may be doing too much work on its main thread.
03-20 12:24:16.656 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 227 frames!  The application may be doing too much work on its main thread.
03-20 12:24:21.620 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 297 frames!  The application may be doing too much work on its main thread.
03-20 12:24:25.745 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 246 frames!  The application may be doing too much work on its main thread.
03-20 12:24:29.319 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 213 frames!  The application may be doing too much work on its main thread.
03-20 12:24:29.604 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 18.303ms
03-20 12:24:32.486 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 27.499ms
03-20 12:24:33.859 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 271 frames!  The application may be doing too much work on its main thread.

 03-20 12:24:33.859 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 271 frames!  The application may be doing too much work on its main thread.
03-20 12:25:22.535 3857-3857/com.sharpandroid.music E/com.sharpandroid.music.StreamingMediaPlayer: Buffered File path: /data/data/com.sharpandroid.music/cache/playingMedia0.dat
03-20 12:25:22.535 3857-3857/com.sharpandroid.music E/com.sharpandroid.music.StreamingMediaPlayer: Buffered File length: 170599
03-20 12:25:22.661 3857-3857/com.sharpandroid.music E/MediaPlayer: Should have subtitle controller already set
03-20 12:25:22.735 3857-3857/com.sharpandroid.music E/MediaPlayer: Should have subtitle controller already set
03-20 12:25:27.695 3857-3857/com.sharpandroid.music I/Choreographer: Skipped 297 frames!  The application may be doing too much work on its main thread.
03-20 12:25:31.840 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 18.142ms
03-20 12:25:32.608 3857-3857/com.sharpandroid.music E/MediaPlayer: Should have subtitle controller already set
03-20 12:25:32.701 3857-3857/com.sharpandroid.music E/MediaPlayer: Should have subtitle controller already set
03-20 12:25:39.066 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 6.837ms
03-20 12:26:12.803 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 51.454ms
03-20 12:26:16.327 3857-3864/com.sharpandroid.music W/art: Suspending all threads took: 114.446ms

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • 战在春秋 2017-03-20 21:53
    已采纳

    Skipped 127 frames! The application may be doing too much work on its main thread

    意思是指在UI线程执行了耗时长的操作,比如数据库访问,数学计算,数组排序等等。
    可以另开线程处理与UI操作无关的事情,或者在主线程中使用AsyncTask。
    此方面的范例很多,可以用Thread、Runnable、AsyncTask为关键字搜索。

    另外一个可能的原因是使用了过大的图片资源,比如背景图片,图标。

    已采纳该答案
    打赏 评论
  • fcwxin 2017-03-21 03:59

    把application中的一些耗时操作写到子线程里边,或者不在application里边运行,放到activity里边再来调试

    打赏 评论

相关推荐 更多相似问题