使用哪个gradle文件将应用程序设置为可调试的? [英] Which gradle file to use to set the application as debuggable?
本文介绍了使用哪个gradle文件将应用程序设置为可调试的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是android开发的新手.我刚刚开始设置设备以调试应用程序.通过 Android开发工具时,它说要设置buildTypes
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)?
推荐答案
您的项目中有两个gradle文件-
There are two gradle files in your project -
- 顶级
- 应用程序级别
您需要将其添加到应用级gradle文件-
You need to add it to your app level gradle file -
YourApplicationRootFolder -> app -> build.gradle
您需要像这样添加它-
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
看这张图片以获得更好的主意-
Look at this image to get a better idea -
这篇关于使用哪个gradle文件将应用程序设置为可调试的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文