gpt4 book ai didi

android - E/FirebaseInstanceId : Error while delivering the message: ServiceIntent not found

转载 作者:行者123 更新时间:2023-11-29 16:31:45 26 4
gpt4 key购买 nike

首先,我将 FirebaseAnalytics 添加到我的 Android Unity 项目中,它在测试中运行良好。然后,当我添加 FirebaseMessaging 并构建应用程序并从我的 FireBase 面板发送消息时,该消息不会显示在设备/模拟器上,我在 Logcat 中收到此错误:

E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement

1722-4448/system_process W/ActivityManager: Unable to start service Intent { act=com.google.firebase.MESSAGING_EVENT pkg=pack_name (has extras) } U=0: not found

E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.

有个话题here没有具体的问题答案。

我关注了 FireBase walkthrough将 FirebaseMessaging.unitypackage 添加到我的项目中,并据此将这些行添加到我的 list 中:

<!-- The MessagingUnityPlayerActivity is a class that extends
UnityPlayerActivity to work around a known issue when receiving
notification data payloads in the background. -->
<activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<service android:name="com.google.firebase.messaging.MessageForwardingService" android:exported="false" />

附言:

在@jeevashankar 回答我的 list 中添加提到的服务后,当通知到达时我收到此错误:

E/BufferQueueProducer: [SurfaceView - pack_name/com.google.firebase.MessagingUnityPlayerActivity#0] query: BufferQueue has been abandoned [SurfaceView - /com.google.firebase.MessagingUnityPlayerActivity#0] connect: BufferQueue has been abandoned E/BufferQueueProducer: [SurfaceView - pack_name/com.google.firebase.MessagingUnityPlayerActivity#0]

更新:我在一个空的 Unity 项目中测试了 FirebaseMessaging,并在模拟器/设备上对其进行了测试,它一直运行到 Android 7.1.1。但在 Android 8 (API 26) 及更高版本中会出现此错误,并且不会收到消息:

system_process E/NotificationService: No Channel found for pkg=, channelId=null, id=0, tag=campaign_collapse_key_4015583716848879920, opPkg=, callingUid=10122, userId=0, incomingUserId=0, notificationUid=10122, notification=Notification(channel=null pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0x00000000 vis=PRIVATE)

最佳答案

我遇到了同样的问题:

E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found

一段时间后,我通过在 list 中导出服务找到了解决方案

<service
android:name=".MyMessagingService"
android:exported="true"
tools:ignore="ExportedService" >

<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>

</service>

关于android - E/FirebaseInstanceId : Error while delivering the message: ServiceIntent not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54531674/

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