检测您是否在运行时是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的构建变体/口味上设置一个布尔值会更容易。
例如:如果在Release和Staging上运行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
更多推荐
发布评论