Cordoba could not install "cordova-plugin-whitelist": Error: ENOENT: there is no such file or directory AndroidManifest.xml

I have Cordova 8.0.0 on OSx 10.13.2 with Node v8.5.0 and npm v5.5.1.

After adding the cordova-plugin-ibeacon , when I do a cordova platform add android , I get the following error:

Failed to install "cordova-plugin-whitelist": Error: ENOENT: there is no such file or directory AndroidManifest.xml

Screenshot:

Screenshot

+5
source share
3 answers

You are using cordova-android@ ~ 7.0.0

I encountered the same problems with the recent pull of cordova-android reporter with Cordova 8.0.0

Lower android-cordova to 6.4.0 as follows:

 cordova platform remove android cordova platform add android@6.4.0 
+8
source

This is a bit late. But the exchange of some personal observations when I came across similar problems.

The build process fails if there is an old plugin that is not updated to work with the @ 7.0.0 platform . At least it concerns me. After installing this incompatible plugin, it will ruin the files on the platform. After that, an attempt to reset the project by removing the plugin will also fail, because during installation the files will be placed in the wrong directories. You will need to remove the cordova-rm platform platform, followed by the wrong plug-in channel and re-add your platform before the build is fixed.

Why android@6.30 and android@6.4.0 can work, because it probably uses the older directory of the platform project directory, where, as it turned out, the top level directory / platform / android is used for the "res" and "libs" folders.

Starting with android@7.0.0 , I noticed that the subdirectory "app" has been added, and your "config.xml" and "res" are expected at '/platform/android/app/src/main/res/xml/config.xml' , not '/ platforms / android / res / xml / config.xml'.

An old plugin may have install / uninstall scripts that copy files to the wrong places.

Only 2 ways to fix this problem is to upgrade the plugin or lower the platform, as Bharat Biswal suggests.

If someone has a more specific answer, that would be great.

+1
source

You are using cordova 7.0.0 or cordova 8.0.0, A similar problem is observed with IONIC

You will find these problems with most plugins such as admobpro, admob, itablet, whitelist, etc.

Now it’s better to go back to the previous version of cordova ie 6.3.0 or 6.4.0

If you see the mentioned problems with any of the plugins, try this.

 cordova platform remove android cordova platform add android@6.3.0 

OR

 cordova platform remove android cordova platform add android@6.4.0 
0
source

Source: https://habr.com/ru/post/1274396/


All Articles