【问题标题】:D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERSD/FirebaseInstanceId:后台同步失败:INVALID_PARAMETERS
【发布时间】:2017-05-17 08:49:43
【问题描述】:

尝试使用FCM注册令牌,连接正常,但出现如下错误:

Client not ready yet..Waiting for process to come online
Connected to process 13635 on device emulator-5554
D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERS, retry in 10s
D/FirebaseInstanceId: background sync failed: INVALID_PARAMETERS, retry in 20s

【问题讨论】:

  • 签入真机

标签: android firebase-cloud-messaging


【解决方案1】:

我也遇到了同样的问题,我已经通过在 AndroidManifest.xml 文件中添加以下代码解决了它

<application android:label="My APP Name" android:icon="@mipmap/icon">


<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
  <intent-filter>
    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
    <category android:name="${applicationId}" />
  </intent-filter>
</receiver>

【讨论】:

  • 在这里尝试了这两个建议,但仍然遇到同样的问题。还有什么我应该检查的吗?
【解决方案2】:

记得让安装干净。有类似的问题,我已经通过在真实设备上卸载并重新启动它来解决它。 Firebase 需要在首次启动时注册设备。

【讨论】:

    猜你喜欢
    • 2023-03-11
    • 2017-01-06
    • 1970-01-01
    • 2023-04-11
    • 1970-01-01
    • 2017-05-13
    • 2019-08-20
    • 2018-10-01
    • 1970-01-01
    相关资源
    最近更新 更多