且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查编程是否应用程序正在运行的调试模式或不?

更新时间:2022-11-06 18:38:57

这是@ Im0rtality提供的答案是正确的:

The answer that @Im0rtality provides is the correct one:

boolean isDebuggable =  ( 0 != ( getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );

(从这个谷歌的博客文章

更新:可能是&安培; = 应该只是&安培; 的上述前pression,虽然&安培; = 是谷歌在其博客文章)

(UPDATE: probably the &= should be just & in the above expression, though &= is what Google has in their blog post)

感谢您的合作,但它不工作在我的情况

thanks for cooperation but it is not working in my case

我很遗憾听到这个消息。当然,由于解释什么是不工作在我的情况是你当选跳过,我不能帮助您进一步。

I'm sorry to hear that. Of course, since explaining what "not working in my case" is something you elected to skip, I cannot help you further.