问题
I have added a plugin to my cordova application using the following command
plugman install --platform android --project ./platforms/android --plugin https://github.com/zendrive/zendrive-sdk-phonegap-plugin.git
But, if I run
cordova run android --device
The config.xml file of android project automatically changes to remove the zendrive-sdk-phonegap-plugin and I receive "class not found" error when using the plugin api from code.
NOTE: The apk generated by phonegap cloud build has the same behaviour "class not found" and this plugin works just fine if I add plugin using
cordova plugin add https://github.com/zendrive/zendrive-sdk-phonegap-plugin.git
回答1:
Because your class src/android/com/zendrive/phonegap/ZendriveCordovaPlugin.java
not found that you declared inside plugin.xml
.
来源:https://stackoverflow.com/questions/27578487/class-not-found-for-plugin-installed-by-plugman