I am newbie to android development. I have just started setting up my device to debug my application. while going through android develop tools it says to set buildTypes
debuggable
to true in build.gradle file . I am not sure which grade file to use gradle.build(Module) or gradle.build(project)?
Show activity on this post. By putting android:debuggable="true" in your manifest file, application will go in debug mode, that means android will manage all logs file regarding your application. But make sure put it again false (or remove this tag) if application will going to live or for release mode.
gradle file is located inside your project folder under app/build. gradle.
Android allows the attribute android:debuggable to be set to true in the manifest, so that the app can be debugged. By default this attribute is disabled, i.e., it is set to false , but it may be set to true to help with debugging during development of the app.
There are two gradle files in your project -
You need to add it to your app level gradle 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 -
Debug buildType makes build debuggable by default; instead, Release buildType makes build not debuggable by default. If you want to change this behaviour, you can define in your module app the property debuggable (boolean) as you need. Gradle properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With