【问题标题】:In the Google Play Developer console, I'm getting warnings in the Pre-Launch tests mentioning:在 Google Play 开发者控制台中,我在发布前测试中收到警告,其中提到:
【发布时间】:2017-01-24 15:30:00
【问题描述】:

Google Play 开发者控制台中,我在发布前测试中收到警告,其中提到:

java.lang.NullPointerException:尝试从空对象引用上的字段 java.lang.String android.accounts.Account.type 读取

应用程序永远不会崩溃并且测试成功,但警告仍然存在于测试的详细信息中。 android.accounts.Account 是什么?如何确保它没有问题?

【问题讨论】:

    标签: android


    【解决方案1】:

    如果您使用的是 Account Manager,请确保您传递了两个参数。

    final Account account = new Account(mUsername, your_account_type);
    mAccountManager.addAccountExplicitly(account, mPassword, null);
    

    更多信息 - Android documentation for Account Manager

    如果您没有使用客户管理器,请忽略。并详细说明您要添加的功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-04
      • 1970-01-01
      • 2019-02-13
      • 2017-08-26
      相关资源
      最近更新 更多