【问题标题】:Why does Picasso comment that "Do NOT pass BuildConfig.DEBUG"为什么毕加索评论说“不要通过 BuildConfig.DEBUG”
【发布时间】:2016-06-30 16:16:47
【问题描述】:

https://github.com/square/picasso/blob/master/picasso/src/main/java/com/squareup/picasso/Picasso.java#L444

  /**
   * Toggle whether debug logging is enabled.
   * <p>
   * <b>WARNING:</b> Enabling this will result in excessive object allocation. This should be only
   * be used for debugging Picasso behavior. Do NOT pass {@code BuildConfig.DEBUG}.
   */
  @SuppressWarnings("UnusedDeclaration") // Public API.
  public void setLoggingEnabled(boolean enabled) {
    loggingEnabled = enabled;
  }

我正在学习毕加索的源码,不知道为什么不能用BuildConfig.DEBUG

我知道 Eclipse/ADT 中存在一些问题,但它在 Android Studio/Gradle 中仍然不可靠吗?还是其他原因?

【问题讨论】:

    标签: android picasso android-buildconfig


    【解决方案1】:

    我认为您不应该在调试版本中一直启用它。仅当您在修复毕加索时遇到一些问题并想要调试和禁用时才启用此功能。

    【讨论】:

    • 谢谢。你说得对。Pissaco 的日志太长了。我在调试模式下禁用它。
    猜你喜欢
    • 2016-08-04
    • 1970-01-01
    • 1970-01-01
    • 2016-10-26
    • 2015-01-13
    • 1970-01-01
    • 2014-05-14
    • 2014-01-23
    • 1970-01-01
    相关资源
    最近更新 更多