Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
536 views
in Technique[技术] by (71.8m points)

push notification - Failed to resolve Intent Service Android

I am getting following error when trying to configure Push Notification:

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.

I have different flavors in gradle:

My code package name is : com.ebr.apps.ebr My product flavor package is: com.ebr.apps.ebr.development

I have placed google-services.json in app/src/development

Manifest:

    <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>

I have looked at many example but still getting this error.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...