Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve symbol '@string/default_notification_channel_id'

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.

like image 649
Jaime Montoya Avatar asked Nov 23 '17 01:11

Jaime Montoya


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.

like image 112
Rahul Mishra Avatar answered Sep 25 '22 10:09

Rahul Mishra