你我渐行渐远 2017-03-20 08:24 采纳率: 66.7%
浏览 2939
已采纳

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 13:53
    关注

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

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

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部