So here's how you can optimize, analyze your current application using TraceView.
Open your Project, and after onCreate() , or anywhere you want to start Log tracing, paste the following lines:

/* start tracing to "/sdcard/filename.trace" */Debug.startMethodTracing("filename");

It is very important to stop tracing after you have done debugging. To do that, place these lines before onCreate() .

public void onDestroy() {// stop tracingDebug.stopMethodTracing();}

Now run your Project, do anything you'd like to optimize, and quit. Open up DDMS File Explorer , and download /sdcard/filename.trace to your hard disk drive.

Go to your Android SDK folder, open Tools directory, and run ./traceview filename.trace

Here's how it looks like:

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android中使用ormlite
  2. RecyclerView导入依赖包
  3. [Android] 环境配置之Android(安卓)Studi
  4. Android(安卓)讀取.txt文件出現亂碼的解
  5. TransactionTooLargeExceptions on Andro
  6. Android(安卓)中文API (46) —— SimpleAda
  7. Android(安卓)积累一些常见的开发异常与
  8. Android(安卓)studio 百度地图开发(3)地图
  9. Android(安卓)Activity 之横竖屏的生命周
  10. Android学习笔记10:TextView的使用