Issue
After adding Youtube-video-player plugin to my project build is getting failed saying:
Parsing platforms/android/res/xml/config.xml failed
(node:6525) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'platforms/android/AndroidManifest.xml' at Object.fs.openSync (fs.js:663:18) at Object.fs.readFileSync (fs.js:568:33) at Object.parseElementtreeSync (platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) at new AndroidManifest (platforms/android/cordova/lib/AndroidManifest.js:29:20) at updateProjectAccordingTo (platforms/android/cordova/lib/prepare.js:187:20) at platforms/android/cordova/lib/prepare.js:47:16 at _fulfilled (platforms/android/cordova/node_modules/q/q.js:854:54) at self.promiseDispatch.done (platforms/android/cordova/node_modules/q/q.js:883:30) at Promise.promise.promiseDispatch (platforms/android/cordova/node_modules/q/q.js:816:13) at platforms/android/cordova/node_modules/q/q.js:570:49 (node:6525) 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:6525) [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.
Solution
If you are using Cordova version 7.0.0 or later then downgrade to cordova version 6.5.0 for the plugin to work. Directory structure created by latest version is different than the older one and the plugin has not been updated accordingly to accommodate it and that's why you get this error. After downgrading remove and add the Android Platform again and also remove other plugins as they may not work with the older version and add them again in your project
Answered By - ad999
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.