Cordova: Fix FCM plugin error
Mon Aug 29 2022 18:41:33 GMT+0000 (Coordinated Universal Time)
Saved by
@marcopinero
#javascript
/*
at: plugins/cordova-plugin-fcm/scripts/fcm_config_files_process.js
Now change the file like this:
*/
// change
var strings = fs.readFileSync("platforms/android/res/values/strings.xml").toString();
// to
var strings = fs.readFileSync("platforms/android/app/src/main/res/values/strings.xml").toString();
// AND
//change
fs.writeFileSync("platforms/android/res/values/strings.xml", strings);
//to
fs.writeFileSync("platforms/android/app/src/main/res/values/strings.xml", strings);
/*After that, copy the google-services.json file to the following directories:
platforms/android/google-services.json
platforms/android/app/google-services.json */
content_copyCOPY
Comments