[英]How to build a debug android apk so BuildConfig.DEBUG is true?
在代码中有一些地方我使用标志BuildConfig.DEBUG,我在哪里可以设置这个标志,我怎么能做一个调试android apk所以BuildConfig.DEBUG是真的?
where can I set this flag
我在哪里可以设置这个标志
It is set for you automatically when you create a debug
build. 在创建
debug
版本时会自动为您设置。 You can use the Build Variants view in Android Studio to choose what build is used when you run your app from the IDE. 您可以使用Android Studio中的Build Variants视图来选择从IDE运行应用程序时使用的构建。
If you create custom build types, you can use debuggable true
to mark them as debuggable, and they will have BuildConfig.DEBUG
set to true
as well. 如果您创建自定义构建类型,则可以使用
debuggable true
将它们标记为可调试,并且它们也将BuildConfig.DEBUG
设置为true
。
When you run your project in Android Studio. 在Android Studio中运行项目时。 The apk that it install in your testing device is the debug apk.
它在你的测试设备中安装的apk是调试apk。 You can find the apk in
你可以找到apk
YourApplication\\app\\build\\outputs\\apk
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.