Which gradle file to use to set the application as debuggable?

别等时光非礼了梦想. 提交于 2019-12-04 01:04:59

There are two gradle files in your project -

  1. Top level
  2. App level

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!