Android app debug using ddms

2,960 views

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,960
On SlideShare
0
From Embeds
0
Number of Embeds
74
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Android app debug using ddms

  1. 1. Android App Debug Using DDMS (Dalvik Debug Monitor Server)<br />
  2. 2. DDMS<br />
  3. 3. Process Info Window<br />
  4. 4. Logcat<br />Or Adb Shell:<br /># logcat –v time > /storage/logcat.txt &<br />
  5. 5. Show Heap Updates<br />
  6. 6. Heap Dump<br />Hprof converter<br />Eclipse Memory Analyzer<br />
  7. 7. Memory Analyzer<br />
  8. 8. Method Profiling<br />
  9. 9. Memory Management<br />Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself)<br />Try using the context-application instead of a context-activity<br />Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside. The solution to this issue is to use a static inner class with a WeakReference to the outer class, as done in ViewRoot and its W inner class for instance<br />A garbage collector is not an insurance against memory leaks<br />http://developer.android.com/resources/articles/avoiding-memory-leaks.html<br />

×