gpt4 book ai didi

android - 无法解析 Intent Service Android

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:12:44 25 4
gpt4 key购买 nike

我在尝试配置推送通知时遇到以下错误:

06-07 01:05:59.735 18708-18708/com.ebr.apps.ebr.development E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
06-07 01:05:59.735 18708-18708/com.ebr.apps.ebr.development E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.

我在gradle中有不同的口味:

我的代码包名称是:com.ebr.apps.ebr我的产品 flavor 包是:com.ebr.apps.ebr.development

我已将 google-services.json 放在 app/src/development

list :

    <permission
android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>

<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/>

<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
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>

<service
android:name=".GCM.PushNotificationService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
</intent-filter>
</service>

我看了很多例子,但仍然遇到这个错误。

最佳答案

我找到了解决方案,问题是 Instabug GCMListener 与我的 GCMListener 冲突。我设置了我的 gcm 监听器的优先级,它开始工作了。

<service
android:name=".GCM.PushNotificationService"
android:exported="false">
<intent-filter android:priority="10000">
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
</intent-filter>
</service>

关于android - 无法解析 Intent Service Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37666056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com