在调试模式下运行 Android Studio 应用而不显示广告?

huangapple go评论57阅读模式
英文:

Run android studio app in debug mode without ads?

问题

有没有简单的方法在调试模式下去除广告?在构建我的应用程序时,我对自己的测试广告感到烦恼 :D我正在使用IronSource广告中介。

英文:

Is there an easy way to deactivate ads in debug mode?
I'm getting annoyed from my own test ads while building my app 在调试模式下运行 Android Studio 应用而不显示广告?
I am using IronSource mediation.

答案1

得分: 3

只需添加一个if语句来检查您当前是否处于调试模式或发布模式:

if (!BuildConfig.DEBUG) {
    showAds();
}
英文:

Just add an if statement to check if you're in the debug mode or release mode :

  if (!BuildConfig.DEBUG) {
       showAds();
    }

huangapple
  • 本文由 发表于 2020年9月3日 06:52:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/63714513.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定