在代码中有一些地方我使用标志BuildConfig.DEBUG,我在哪里可以设置这个标志,我怎么能做一个调试android apk所以BuildConfig.DEBUG是真的?
where can I set this flag
It is set for you automatically when you create a debug
build. You can use the Build Variants view in Android Studio to choose what build is used when you run your app from the 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.
When you run your project in Android Studio. The apk that it install in your testing device is the debug apk. You can find the apk in
YourApplication\\app\\build\\outputs\\apk
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.