Android卡顿优化
16lz
2021-01-23
先在方法最前面插桩:
1.Trace.beginSection("methodName");
或者TraceCompat.beginSection("methodName");
方法最后:
Trace.endSection();
或者
TraceCompat.endSection();
2.然后开始执行:
python /Users/qiluo/Library/Android/sdk/platform-tools/systrace/systrace.py -t 20 sched gfx view wm am app webview -a "packageName" -o ~/Documents/log.html
等待命令行出现:
Starting tracing (20 seconds)
3.然后开始操作APP,执行方法介绍后,打开
~/Documents/log.html进行分析
更多相关文章
- Android Studio集成Library时报错,终极解决方法
- Android从服务器获取图片的实例方法
- android屏幕休眠和唤醒两种方法(newWakeLock)
- Android 数据库事务操作
- android添加图片到本地,无法即使刷新的解决方法
- Android每天定时任务启动方法
- android Timer使用方法
- Android 使用git下载源码报错解决方法
- Android中的onCreateOptionsMenu()方法和onOptionsItemSelected()方