在日常的开发中,避免会有疏忽大意造成的异常、错误等。在Android中如何排查和跟踪这些错误或者异常呢?
跟踪问题的方法主要有:
1.记录栈中跟踪的诊断性日志。
2.利用调试器进行断点调试。
最后给大家介绍Android特有的调试工具Android Lint
Android Lint能够对定义在XML文件中的对象做检查,那怎么眻使用Android Lint呢?
打开检查的步骤:Android Tools ---> Run LintCheck for Common Errors.
随后你可以看到Lint Warnings,酌情进行修复这些Warnings.
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.