PhoneGap 3 plugin: exec() call to unknown plugin "..."
define your plugin in "res/xml/config.xml"
find these lines in the file
<feature name="App"> <param name="android-package" value="org.apache.cordova.App" /></feature>
and append these right after:
<feature name="MyPluginName"> <param name="android-package" value="com.phonegap.plugins.plugin.class" /></feature>
replace the dummy names (MyPluginName, plugins.plugin.class, etc) with the actual names. This works for me when I was getting this error:
exec() call to unknown plugin : MyPluginName
I am all of a sudden getting the same issue with my phone gap build (2.6). Same exact code worked prior so it must be a build issue.
Did you tried to open your apk and see if config.xml is included (there is where plugins are defined).
On Android Studio 1.0.1 (running on Mac OS 10.9.5) + Cordova 4.2.0, I fixed a similar problem ("exec() call to unknown plugin") as follow:
it happened that the content of the tag:
<feature name="MyPluginName"><param name="android-package" value="com.phonegap.plugins.plugin.class" /></feature>
Under YourCordovaProjectName/config.xml was not duplicated under YourCordovaProjectName/platforms/android/res/xml/config.xml
I had to alter the file config.xml under YourCordovaProjectName/platforms/android/res/xml/ and to add the tag:
<feature name="MyPluginName"> <param name="android-package" value="com.phonegap.plugins.plugin.class" /> </feature>
Then it worked.
I will also add that I've experienced the same problem with IOS, I had to enter manually:
<feature name="MyPluginName"><param name="ios-package" value="com.phonegap.plugins.plugin.class" /></feature>
In the file config.xml under the folder YourCordovaProjectName/platforms/ios/YourCordovaProjectName
Hopefully that will be fixed in the future and the content of YourCordovaProjectName/config.xml will correctly be reflected in the config.xml files that are under each specific platforms (it used to worked correctly for Android few months ago).