0

I have been trying to run the Cordova Maps Sample project on Netbeans. I was following the instructions given on the youtube video. When I try to run the project it gives me an error

The Logcat Error:

Error: CordovaError: The plugin 'cordova-plugin-compat' is required by (cordova-plugin-contacts, cordova-plugin-geolocation), skipping uninstallation.
at runUninstallPlatform (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\uninstall.js:272:30)
at C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\uninstall.js:96:16
at _fulfilled (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\node_modules\q\q.js:796:13)
at C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\node_modules\q\q.js:604:44
at runSingle (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\node_modules\q\q.js:137:13)
at flush (C:\Users\VS\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\node_modules\q\q.js:125:13)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
Result: 1

I tried running the following command cordova plugin add cordova-plugin-compat ,but, it gives me a message saying Plugin "cordova-plugin-compat" already installed on android.

Can somebody advise me as to where am I going wrong?

Thanks

Sachin

Arjun saini
  • 4,223
  • 3
  • 23
  • 51
sachinb
  • 425
  • 2
  • 6
  • 10
  • I have used the solution given in [link](http://stackoverflow.com/questions/28877109/cordova-android-project-doesnt-compile) and it works. Thanks. – sachinb Jun 26 '16 at 13:37

2 Answers2

0

Try removing the plugin and adding it again.

cordova plugin remove cordova-plugin-compat

cordova plugin add cordova-plugin-compat
0

On the Netbeans screen look for "Important Files" folder and inside that should be a "Cordova Plugins" folder.

Right click on the "Cordova Plugins" folder and select "Edit".

Immediately after all the comments (they're lines that start with #) you'll see the list of plugins start. Add a new plugin before all the others that looks like:

cordova-plugin-compat=https://git-wip-us.apache.org/repos/asf/cordova-plugin-compat.git

Rebuild the application and it should be fixed.

Kevin Lynn
  • 11
  • 2
  • Thanks @kevin-lynn I tried this and it compiled the application without any problem. Unfortunately, when I load the application on an android, it gives me an error **"[ERROR] Error initializing Cordova: Class not found"**. Can you advise me on this problem?. Thanks - Sachin – sachinb Jul 21 '16 at 06:18