PhoneGap build error "plugin not supported: ..."

The following config.xml file produces an error:

<?xml version="1.0" encoding="UTF-8" ?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="LogIn" version="1.0.1" versionCode="10" > <name>...</name> <description>...</description> <author >...</author> <preference name="phonegap-version" value= "3.5.0" /> <preference name="orientation" value= "default" /> <preference name="target-device" value= "universal" /> <preference name="fullscreen" value= "true" /> <preference name="webviewbounce" value= "true" /> <preference name="android-installLocation" value= "internalOnly" /> <preference name="splash-screen-duration" value= "0" /> <preference name="load-url-timeout" value= "20000" /> <access origin="*" /> <feature name="http://api.phonegap.com/1.0/notification" /> <feature name="http://api.phonegap.com/1.0/file" /> <feature name="http://api.phonegap.com/1.0/media" /> <feature name="http://api.phonegap.com/1.0/battery" /> <feature name="http://api.phonegap.com/1.0/camera" /> <feature name="http://api.phonegap.com/1.0/contacts" /> <feature name="http://api.phonegap.com/1.0/geolocation" /> <feature name="http://api.phonegap.com/1.0/network" /> <gap:plugin name="org.apache.cordova.dialogs" ></gap:plugin> <gap:plugin name="org.apache.cordova.device" ></gap:plugin> <gap:plugin name="org.apache.cordova.device-orientation" ></gap:plugin> <gap:plugin name="org.apache.cordova.splashscreen" ></gap:plugin> <gap:plugin name="org.apache.cordova.camera" ></gap:plugin> <gap:plugin name="org.apache.cordova.device-motion" ></gap:plugin> <gap:plugin name="org.apache.cordova.network-information" ></gap:plugin> <gap:plugin name="org.apache.cordova.battery-status" ></gap:plugin> <gap:plugin name="org.apache.cordova.vibration" ></gap:plugin> <gap:plugin name="org.apache.cordova.geolocation" ></gap:plugin> <gap:plugin name="org.apache.cordova.globalization" ></gap:plugin> <gap:plugin name="org.apache.cordova.file" ></gap:plugin> <gap:plugin name="org.apache.cordova.inappbrowser" ></gap:plugin> <gap:plugin name="org.apache.cordova.media" ></gap:plugin> <gap:plugin name="org.apache.cordova.media-capture" ></gap:plugin> <gap:plugin name="org.apache.cordova.contacts" ></gap:plugin> <gap:plugin name="org.apache.cordova.file-transfer" version="0.4.3" ></gap:plugin> <plugin name="cordova-plugin-file-opener2" source="npm" /> </widget> 

Error message:

Error image

The code base is inherited and, as I understand it, the configuration used for proper compilation. Removing the plugin in error leads to the next plugin in the list, which takes place in the error.

The change

 <preference name="phonegap-version" value= "3.5.0" /> 

to

 <preference name="phonegap-version" value= "3.7.0" /> 

and formatting plugins from

 <gap:plugin name="org.apache.cordova.dialogs" ></gap:plugin> 

to

 <gap:plugin name="org.apache.cordova.dialogs" source="npm" ></gap:plugin> 

seems to allow you to create, but plugins do not work in the application.

All tips and suggestions are welcome.

+5
source share
1 answer

For any of you having the same problem, I found a solution:

What it boils down to:

Follow the link: PhoneGap Plugin Page

(I use contacts as an example here) and go to the [Old Plugins] tab. Now find your plugin and open its link in the [PBG Plugin ID] column. Use

<plugin name="org.apache.cordova.contacts" spec="0.2.16" source="pgb" />

as described in [Instructions for use], and replace source="pgb" with source="npm" .

If this fails, use “Option 3” in the comments above than “Use NPM for PhoneGap”, where you use the [Repository] link in the [Other Details] section of your PhoneGap plugin page in your plugin:

 <plugin spec="https://github.com/apache/cordova-plugin-contacts.git" source="git" /> 

Hope this saves a few people in a couple of hours!

+8
source

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


All Articles