gpt4 book ai didi

android - 在运行时检测你是否被 ProGuarded?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:47:04 25 4
gpt4 key购买 nike

有没有办法检测(在运行时)您的应用程序是否被 ProGuarded?我的目标是根据应用程序是否使用 ProGuarded 设置一个 bool 值。

最佳答案

我认为如果您在运行 ProGuard 的build variants/flavors 上设置一个 bool 值会更容易。

例如:如果您在 ReleaseStaging 上运行 ProGuard 而不是在 Debug 上运行,则在发布和暂存时将 bool 变量设置为 true ,但在调试时为 false。 This may help

关于android - 在运行时检测你是否被 ProGuarded?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30602856/

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