关于应用性能检查的几个文章

来源:互联网 发布:网络销售公司规章制度 编辑:程序博客网 时间:2024/05/22 00:23

1.利用mat工具来检查内存泄漏


链接:http://jingyan.baidu.com/article/fec7a1e5f1c7291190b4e796.html

http://www.jianshu.com/p/c49f778e7acf


2.分析可以优化的地方

lint for android studio工具


在性能测试之前,首先要对工程源码进行排错和调优。Android Lint 可以通过扫描和检查对Android工程可能存在的问题进行审查,其是一种静态测试工具,通过发现代码中可能存在的问题来在应用发布前保证程序质量。 早期的lint工具可以与Eclipse集成,如今android-studio已经内置这一工具。通过在工程标题上右键->Analyze->Inspect Code可以打开该工具。


 Android Lint可以检查出的错误包括:

  1. Missing translations (and unused translations) 没有翻译的文本
    2. Layout performance problems (all the issues the old layoutopt tool used to find, and more) 布局性能
    3. Unused resources未使用的冗余资源
    4. Inconsistent array sizes (when arrays are defined in multiple configurations)在多个配置中的数组大小不一致文件
    5. Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
    6. Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
    7. Usability problems (like not specifying an input type on a text field)
    8. Manifest errors

     双击错误信息,可以看到错误的详情介绍和在代码中的位置。(这里的错误往往不是异常或error,而是你代码中可以进一步优化的部分


0 0
原创粉丝点击