Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 接收时GCM错误:无法解析目标意图服务,跳过类名强制_Android_Google Cloud Messaging_Android Manifest - Fatal编程技术网

Android 接收时GCM错误:无法解析目标意图服务,跳过类名强制

Android 接收时GCM错误:无法解析目标意图服务,跳过类名强制,android,google-cloud-messaging,android-manifest,Android,Google Cloud Messaging,Android Manifest,我按照此处的说明设置了一个客户端GCM应用程序: 目前,我选择使用标准的GCM,而不是新的Firebase云消息 My app server是一个node.js实例,使用node gcm发送推送通知 我的应用程序成功接收通知,但打印出以下错误: E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement E/FirebaseInstanceId: Error while

我按照此处的说明设置了一个客户端GCM应用程序:

目前,我选择使用标准的GCM,而不是新的Firebase云消息

My app server是一个node.js实例,使用node gcm发送推送通知

我的应用程序成功接收通知,但打印出以下错误:

E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
以下是我的AndroidManifest.xml的相关部分:

<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="com.example.myapp" />
    </intent-filter>
</receiver>

<service
    android:name="com.example.myapp.gcm.GcmListener"
    android:exported="false" >
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    </intent-filter>
</service>

<service
    android:name="com.example.myapp.gcm.InstanceIDListener"
    android:exported="false">
    <intent-filter>
        <action android:name="com.google.android.gms.iid.InstanceID" />
    </intent-filter>
</service>

<service android:name="com.example.myapp.gcm.RegistrationIntentService"
         android:exported="false" />

我的项目有上面所有的类(减去谷歌提供的GcmReceiver)

GcmReceiver扩展了GcmListenerService
InstanceIDListener扩展InstanceIDListenerService
注册服务扩展了IntentService


我是否遗漏了可能导致此错误的任何内容?这个错误真的会影响什么吗?

我试用了谷歌自己的GCM示例应用程序,但我也遇到了同样的错误。我决定迁移到FCM,不再出现任何错误。使用OPF推送库-同样的错误。我甚至不能处理onMessage回调。对我来说几乎一样。我正在使用FCM并通过这些错误日志获取推送通知。我必须关心他们吗?我也有同样的问题,不知道如何处理。我尝试了谷歌自己的GCM示例应用程序,但我得到了同样的错误。我决定迁移到FCM,不再出现任何错误。使用OPF推送库-同样的错误。我甚至不能处理onMessage回调。对我来说几乎一样。我正在使用FCM并通过这些错误日志获取推送通知。我必须关心他们吗?我也有同样的问题,不知道如何处理。