What gradle file is used to install the application as debugged?

I am new to Android development. I just started setting up my device to debug my application. while developing tools for Android , he says to set buildTypes debuggable to true in the build.gradle file. I'm not sure which sort file to use gradle.build (Module) or gradle.build (project)?

+8
android android-gradle build.gradle
source share
2 answers

There are two gradle files in your project -

  • Top level
  • Application level

You need to add it to the gradle application level file -

 YourApplicationRootFolder -> app -> build.gradle 

You need to add it like this:

 buildTypes { debug { debuggable true } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } 

Look at this image to get a better idea -

enter image description here

+14
source share

Debug buildType does default debugging by default; instead, Release buildType makes the build not debugged by default. If you want to change this behavior, you can define the debuggable (boolean) property in your modular application as needed. Gradle Properties

0
source share

All Articles