检测您是否在运行时是ProGuarded?(Detect whether you are ProGuarded at runtime?)

系统教程 行业动态 更新时间:2024-06-14 16:59:47
检测您是否在运行时是ProGuarded?(Detect whether you are ProGuarded at runtime?)

有没有办法检测(在运行时)您的应用程序是否为ProGuarded? 我的目标是根据应用程序是否为ProGuarded设置布尔值。

Is there a way to detect (during runtime) if your application is ProGuarded? My goal here is to set a boolean value based on whether the application is ProGuarded or not.

最满意答案

我认为如果你在运行ProGuard的构建变体/口味上设置一个布尔值会更容易。

例如:如果在ReleaseStaging上运行ProGuard但未在Debug上运行,则在发布暂存时将boolean变量设置为true,但在调试时设置为false。 这可能有所帮助

I think it'd be easier if you set a boolean on build variants/flavors that you run ProGuard on.

For example: if you run ProGuard on Release and Staging but not on Debug, set a boolean variable to true on release and staging, but false on debug. This may help

更多推荐

本文发布于:2023-04-17 09:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/e7f920009772781144c8ad351d151ed0.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:您是否   ProGuarded   runtime   Detect

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!