Tried to register a token using FCM, the connection is OK, but I get the following error:
尝试使用FCM注册一个令牌,连接是OK的,但是我得到以下错误:
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
2 个解决方案
#1
0
I also had same issue and I have solved it by just adding below code in AndroidManifest.xml file
我也有同样的问题,我通过在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
0
Remember to make the installation clean. Had similar issue and I have solved it by uninstalling and relaunch it on real device. Firebase needs to register the device at first launch.
记住要使安装干净。有类似的问题,我已经解决了通过卸载和重新启动它在真正的设备。Firebase需要在第一次启动时注册设备。
#1
0
I also had same issue and I have solved it by just adding below code in AndroidManifest.xml file
我也有同样的问题,我通过在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
0
Remember to make the installation clean. Had similar issue and I have solved it by uninstalling and relaunch it on real device. Firebase needs to register the device at first launch.
记住要使安装干净。有类似的问题,我已经解决了通过卸载和重新启动它在真正的设备。Firebase需要在第一次启动时注册设备。