Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
467 views
in Technique[技术] by (71.8m points)

android - PhoneGap 3 plugin: exec() call to unknown plugin "..."

I've been trying to upgrade a plugin to v3, and I've managed to get past the plugin loading issues, and I've managed to expose the plugin to the client environment (making changes to the way exec works, etc).

But when I watch the adb logcat with

adb logcat | grep -v nativeGetEnabledTags | grep -i web

I get this error:

D/PluginManager(11189): exec() call to unknown plugin: WebSocket

I can't work out what's gone wrong, and I'm not sure why the Android build can't see the plugin.

I've pushed ALL the code to a github repo, so if someone is able to replicate and help I'd be very welcome! I'm also trying to write up my experience of the conversion and logging the gotchas as I hit them (there's some in the readme, though it's incomplete):

Here's the repo: https://github.com/remy/phonegap_test

– Remy

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...