Closed georgenacouzi closed 4 years ago
You don’t need to run ‘cordova plugin add cordova-support-google-services’. Just add the analytics plugin, and this one will be installed automatically as a dependent plugin.
hello @chemerisuk thank you for your reply,
this is an old phonegap project, i did the following:
• removed the old cordova-plugin-firebase-analytics
• removed this plugin
• removed the old cordova-support-android-plugin
• removed the old android platform 6.3.0
• installed android 7.x.x
• reinstalled cordova-plugin-firebase-analytics
then had the error Failed to install 'cordova-support-android-plugin': Error: ENOENT: no such file or directory, open 'path-to-project\platforms\android\AndroidManifest.xml
this error appeared before reaching the installation of this plugin i don't know if the issue should be moved from here but i believe the same error will appear when the installation reaches this plugin
please note that i only executed cordova platform add cordova-plugin-firebase-analytics
thanks for the help
Try to create a fresh project
cordova create <PATH> [ID [NAME [CONFIG]]] [options]
and add cordova-plugin-firebase-analytics
there. Do you have the issue?
Issue exists with phonegap-plugin-push too. It depends on this plugin, but when installing this plugin, I run into the same error:
Installing "cordova-support-google-services" for android
Failed to install 'cordova-support-google-services': Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at Object.fs.readFileSync (fs.js:510:33)
at Object.parseElementtreeSync (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidProject.js:99:12)
at Api.addPlugin (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/Api.js:223:57)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
(node:71928) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'
I'm using cordova-android@7.1.0
, cordova@8.0.0
, phonegap-plugin-push@2.2.3
, cordova-support-google-services@1.2.0
.
The position of the Android Manifest file was changed after cordova-android@7.0.0
: https://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html.
cordova version 8.0.0 android platform 7.0.1
when running
cordova plugin add cordova-support-google-services
i get the below errorFailed to install 'cordova-support-google-services': Error: ENOENT: no such file or directory, open 'path-to-my-project\platforms\android\AndroidManifest.xml'
where the path of androidManifest.xml is platforms/android/app/src/main
i am trying to install
cordova-plugin-firebase-analytics
that needs this plugin im stuck in a situation where i cannot install this plugin if the android version is >= 7 and i cannot installcordova-plugin-firebase-analytics
if the android version is less than 7and this plugin is needed by the
cordova-plugin-firebase-analytics
pluginthank you