O'Reilly logo

Android UI Design by Jessica Thornsby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging your project

It's crucial that you thoroughly test your app for bugs before releasing it. Android Studio provides a range of tools that you can use to debug an app running on an emulator or a physical Android device, although these tools can only test a debuggable version of your app, which means you'll need to run your app in debug mode.

To run your app in debug mode, open your project's module-level build.gradle file and add the following:

apply plugin: 'com.android.application' 
 
......... 
 
......... 
  } 
   buildTypes {  
          debug {  
                  debuggable true 
            }  
    }  
} 

After editing your Gradle build file, make sure you sync your project. Next, click the Debug icon or select Run from the Android Studio toolbar, followed by Debug.

Select the AVD or physical Android ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required