I have an ionic project and I need to use Batch.
In order to use Batch in the last version (2.0.0), I should update my cordova-android
to >=7.0.0
.
But the problem is that if I update that dependency to the required version, all the other plugins fails because they not support that cordova-android
version yet.
Basically, it says that AndroidManifest.xml
file is not found:
(node:8420) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/<mypath>/platforms/android/AndroidManifest.xml'
if I do this steps:
- remove the android platform (
cordova platform remove android
). - remove node_modules and plugins (
rm -rf /node_modules /plugins
). - remove the plugins entries in the
packaje.json
and inconfig.xml
. - add android platform again (
cordova platform add android
).
The android platform is created.
BUT, if I try to add the batch plugin I have the same error (when they said they support cordova-android >= 7
only):
ionic cordova plugin add com.batch.cordova
> cordova plugin add com.batch.cordova --save
Installing "com.batch.cordova" for android
Failed to install 'com.batch.cordova': Error: ENOENT: no such file or directory, open '/<mypath>/platforms/android/AndroidManifest.xml'
I mentioned this plugin for example because they say that they ONLY support cordova-android >= 7
but it's happening with ALL the cordova plugins in my case.
I could use a minor version of Batch plugin (1.7.4
) that is compatible with older version cordova-android
. But that version of Batch has not got the In app messaging feature and it's required in my case. That version only has Push notifications and events tracking :/
This is my ionic info:
cli packages: (/usr/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.10
Cordova Platforms : android 7.1.1
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.0.2
Node : v6.14.3
npm : 4.6.1
OS : Linux 4.4
Environment Variables:
ANDROID_HOME : /home/ivan/Android
Misc:
backend : legacy
Any solution for this? I can't find any solution. People have this error with specific plugins but in my case it's happening with all the plugins!
Thanks!