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
717 views
in Technique[技术] by (71.8m points)

javascript - Cordova plugin ListPicker error on Ripple emulator

I'm using Cordova within Visual Studio and added the ListView plugin. The plugin was added successfully via the config.xml editor screen

When I call window.plugins.listpicker.showPicker I can trace all the way to cordova.exec(_callback, _error_callback, 'ListPicker', 'showPicker', [config]) then Ripple displays the "I Haz Cheeseburger" error on ListPicker.showPicker We seem to be missing some stuff :(

I have verified that the plugin is listed in the plugins folder with other plugins that I am using

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Short Version: You did not do anything wrong, test your app on a actual device or an emulator and it should work fine.


Long Version:

Caution: Ripple doesn’t provide a complete simulation of Cordova APIs or native device capabilities... You can achieve this by testing on actual devices or emulators.

Taken from here
Ripple is just a simulator: It simulates some of the capabilities of a real device, not all of them. It seems you can test the Cordova core plugins in Ripple, but there is pretty much no support for custom plugins.
I created an empty project Cordova app and just pasted the sample code from the link you provided: In Ripple I get the error you described, while everything works fine, if I run the app on my android device.


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

...