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

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为关键字搜索。

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

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

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘