dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

Installation on cordova 7.1.0 not finding AndroidManifest.xml #205

Closed reyx closed 6 years ago

reyx commented 6 years ago

I'm submitting a:

Bug report

Current behavior: On a clean project using cordova 8.0.0, when trying to install plugin with cordova-android 7.1.0 the installation fails with message :

Error: ENOENT: no such file or directory, open 'D:\projects\cordova\bateclick-app\platforms\android\AndroidManifest.xml'

I believe this plugin was not designed to work with cordova-android >= 7. Is this correct?

Expected behavior:

Terminal fails with message :

Error: ENOENT: no such file or directory, open 'D:\projects\cordova\bateclick-app\platforms\android\AndroidManifest.xml'

Steps to reproduce: On projects root:

ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@4.2.2

Android build issue:

If using an [Ionic Native Typescript wrapper]() for this plugin:

Console output

console output ``` > cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@4.2.2 --save Installing "uk.co.workingedge.phonegap.plugin.launchnavigator" for android Plugin dependency "cordova-plugin-actionsheet@2.3.3" already fetched, using that version. Dependent plugin "cordova-plugin-actionsheet" already installed on android. Plugin dependency "cordova-plugin-dialogs@2.0.1" already fetched, using that version. Dependent plugin "cordova-plugin-dialogs" already installed on android. Failed to install 'uk.co.workingedge.phonegap.plugin.launchnavigator': Error: ENOENT: no such file or directory, open 'D:\projects\cordova\bateclick-app\platforms\android\AndroidManifest.xml' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.parseElementtreeSync (D:\projects\cordova\bateclick-app\platforms\android\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27) at new AndroidManifest (D:\projects\cordova\bateclick-app\platforms\android\cordova\lib\AndroidManifest.js:29:20) at AndroidProject.getPackageName (D:\projects\cordova\bateclick-app\platforms\android\cordova\lib\AndroidProject.js:99:12) at Api.addPlugin (D:\projects\cordova\bateclick-app\platforms\android\cordova\Api.js:223:57) at handleInstall (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:594:10) at C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:357:28 at _fulfilled (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54) (node:20404) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'D:\projects\cordova\bateclick-app\platforms\android\AndroidManifest.xml' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.parseElementtreeSync (D:\projects\cordova\bateclick-app\platforms\android\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27) at new AndroidManifest (D:\projects\cordova\bateclick-app\platforms\android\cordova\lib\AndroidManifest.js:29:20) at AndroidProject.getPackageName (D:\projects\cordova\bateclick-app\platforms\android\cordova\lib\AndroidProject.js:99:12) at Api.addPlugin (D:\projects\cordova\bateclick-app\platforms\android\cordova\Api.js:223:57) at handleInstall (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:594:10) at C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:357:28 at _fulfilled (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30) (node:20404) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:20404) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. at self.promiseDispatch.done (C:\Users\regis\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30) ```


dpa99c commented 6 years ago

Duplicate of #203