简体   繁体   中英

Import custom cordova plugin to mobile first 8.1 react js project

I used the command cordova plugin add [custom_plugin_path] into my mobile first 8.1 react js project.

But when I try to call the cordova.exec for the added plugin, it throws error that cordova is undefined. May I know how to call the plugin in jsx?

Thanks.

Are you testing this on cordova platform browser, or by running the react app in your browser? Cordova will not be available in the browser.

Did you try testing it on a virtual/real device?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM