您的当前位置:首页正文

#深度理解Android技术总结

来源:东饰资讯网

深度理解Android技术总结

Android基础

开发文档

阿里巴巴Android开发规范

框架层知识点

Android中间件

插件化

热修复

Hook框架

VirtualXposed 和epic

Android性能优化

性能指标

  • 流畅更快 卡顿,启动速度,页面显示速度,响应速度
  • 稳定更稳 Crash, ANR
  • 节省更省 内存,CPU,安装包大小,存储,功耗电量,网络

流畅性

启动速度

页面响应速度优化

UI渲染显示速度提升

稳定性

  • 稳定性问题
  • ANR分析策略
  • anr google
  • ANR超时源码解析
  • ANR信息收集
  • ANR input
  • app crash
  • native crash

稳定性分析及工具

Android Device Monitor

Android Device Monitor is a standalone tool that provides a UI for several Android app debugging and analysis tools.However, most components of the Android Device Monitor are deprecated in favor of updated tools available in Android Studio 3.0 and higher. The table below helps you decide which developer tools you should use.

Android Device Monitor component What you should use

  • Dalvik Debug Monitor Server (DDMS)
    This tool is deprecated. Instead, use Android Profiler in Android Studio 3.0 and higher to profile your app's CPU, memory, and network usage.
    If you want to perform other debugging tasks, such as sending commands to a connected device to set up port-forwarding, transfer files, or take screenshots, then use the Android Debug Bridge (adb), Android Emulator, Device File Explorer, or Debugger window.

  • Traceview
    If you want to inspect existing .trace files, or ones you've captured by instrumenting your app with the Debug class, keep using Traceview.
    If you want to record new method traces and inspect realtime CPU usage of your app's processes, use Android Studio's CPU profiler.

  • Systrace
    If you need to inspect native system processes and address UI jank caused by dropped frames, use systrace from the command line.
    Otherwise, use Android Studio's CPU profiler to profile your app's processes.

  • Tracer for OpenGL ES Use the Graphics API Debugger.

  • Hierarchy Viewer
    If you want to inspect your app's view hierarchy at runtime, use Layout Inspector.

If you want to profile the rendering speed of your app's layout, use Window.OnFrameMetricsAvailableListener as described in this blog post.

Pixel Perfect Use Layout Inspector.

crash - 内存泄露OutOfMemoryError

节省性

减少apk安装包大小

减少过渡后台,android后台优化

减少view绘制过度

减少流量消耗

减少电量消耗

减少内存占用

性能优化的建议

Android优化checklist

显示全文