Reputation: 71
I need to have the cordova-plugin-media plugin installed but that has a dependency of the cordova-plugin-file plugin at version 6.0.2.
I have that version locally and can only see version 6.0.2 in my local files.
When I go to build the app using PhoneGap build, it fetches 4.3.3.
How do I force it to use 6.0.2?
I have tried removing the cordova-plugin-file plugin in CLI and then re-adding it to get the 6.0.2 version which works locally.
This is in my config.xml
<plugin name="cordova-plugin-media" spec="~5.0.3" />
<plugin name="cordova-plugin-file" spec="~6.0.2" />
I also added this line (not sure this part is relevant):
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
Due to an error in the build log but I still get the same warning.
I'm using the latest PhoneGap version (and have tried 8.0.0):
<preference name="phonegap-version" value="cli-9.0.0" />
What ever I try, it seems that PhoneGap build always fetches cordova-plugin-file 4.3.3 instead of 6.0.2 as specified.
I have also tried removing the plugin files altogether to force a fresh get, but still it just grabs the old version.
I'm building it online if that info is needed.
Appreciate any help :)
Upvotes: 1
Views: 237
Reputation: 71
Ok, so this was due to the order in which the plugins are listed in the config.xml
I moved the line:
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
to the first plugin to be installed. This made PhoneGap build install it first.
I did get another issue with the cordova-plugin-media-capture plugin, but as I don't need that, I just commented the line out.
Upvotes: 0