Cordova does not create AndroidManifest.xml
Final edit:
cordova-android 7.1.4 is out, it should fix most of this kind of problems.
edit:
As people keep upvoting the answer I'll give more details about the problem.
The problem isn't really the plugin writing on the AndroidManifest.xml
or on the config.xml
. It's true that the location changed and plugins should update the path, but it's not mandatory and Cordova takes care of the new paths.
The problem is some plugins using source-file
tag for things that are not source code. (i.e, using it for copying images instead of using resource-file
tags)
That creates a res folder (or lib) that confuses Cordova, making it believe it's an old Eclipse project, while it's really an Android studio project, and searches for the files on the old locations instead of looking into the new locations.
This has been patched in cordova-android and will be fixed in next release.
The workaround is to look for the plugin using source-file
tag and update it to use resource-file
tag
OLD ANSWER:
It is now in app/src/main/AndroidManifest.xml
.
If the plugin is writing on it, it should be updated to write on the right place.
Read the cordova-android 7.0.0 release blog post
Cordova CLI v8.0 will use [email protected]
by default.
As most of the cordova plugins do not support [email protected]
yet, you can also try using the older one by specifying version:
cordova platform add [email protected]
Or, if you feel comfortable to use [email protected]
, you can also wait for a update on cordova-plugi-admobpro
to support the [email protected]
, it's coming soon.
Downgrading from 7.0 to 6.4 did the trick for me
cordova platform rm android
cordova platform add [email protected]
cordova build
In config.xml
file of the cordova project, under xml tag <platform name="android">
section, Add the following tag:
<resource-file src="platforms/android/app/src/main/AndroidManifest.xml" target="AndroidManifest.xml" />