Chapter 8Debugging and Testing

WHAT'S IN THIS CHAPTER?

  • Debugging Android code
  • Android Monitor
  • Android Device Monitor
  • Android Virtual Device extended controls
  • Android Lint
  • Testing Android code and UI

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code download for this chapter is found at www.wrox.com/go/expertandroid on the Download Code tab. The code for this chapter is in the Chapter8.zip file.

This chapter covers debugging and testing Android projects using Android Studio and SDK tools. You will use applications from Google's Android samples because those provide excellent use cases for debugging and testing.

Debugging helps to detect flaws and solve possible problems with your software and design. One tricky part of debugging Android applications is that you need to remotely debug a running virtual machine or Android device, which requires a connection to send and receive data from the remote device to your development device. That connection is handled with Android SDK tools.

Android Studio provides a good visual debug console and tools to monitor running applications on the device. Android Studio tools are not yet robust enough for detailed debugging and testing, so this chapter also investigates some of the core tools of Android SDK so that readers can better understand the available debugging options.

In addition to debugging, you need to ensure the application is solid, doesn't crash, and does all required tasks without any problems, so defining all the possible ...

Get Expert Android Studio now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.