gpt4 book ai didi

android - BuildConfig.DEBUG 保持为真

转载 作者:太空狗 更新时间:2023-10-29 16:22:42 25 4
gpt4 key购买 nike

我在这里阅读了有关它的其他问题。
然后我清理了源代码并将 android:debuggable 设置为 false。
唯一的结果是警告,我不应该对此进行硬编码。

当然,BuildConfig.DEBUG 仍然为真!

谁真正知道为什么以及该怎么做?

最佳答案

我也看到过关于 BuildConfig.DEBUG 不可靠的报告,尽管我没有使用它。

我已经成功使用了:

    //Figure out if we are in debug mode or not
boolean debugMode = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));

它读取 AndroidManifest.xml 中的 debuggable 标签。

此外,还有一个 Lint 警告进一步说明,不要设置该标记,android 会为您解决。

关于android - BuildConfig.DEBUG 保持为真,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10502955/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com