Cannot resolve symbol '@string/default_notification_channel_id'

Viewed 9367

I am trying to set up a Firebase Cloud Messaging Client app on Android. I am using https://github.com/firebase/quickstart-android/tree/master/messaging as a guideline or template for my implementation. When I try to write the code at https://github.com/firebase/quickstart-android/blob/master/messaging/app/src/main/AndroidManifest.xml, I see the Cannot resolve symbol '@string/default_notification_channel_id' error in the following line:

<meta-data
        android:name="com.google.firebase.messaging.default_notification_channel_id"
        android:value="@string/default_notification_channel_id"/>

enter image description here

Do you have any ideas about a fix for this error? Thank you.

1 Answers

Go to your string resource in res > value > string.xml or simply click alt+enter and paste this code under the resource block:

 <string name="default_notification_channel_id" translatable="false">fcm_default_channel</string>

If you are using the shortcut go tho create string resource and paste "News" in value.

Related