Wednesday, April 5, 2017

Cordova Camera Plugin Version 2.4.0 throwing error when building for android. - ( Guid to remove and add plugins, Maintaining your cordova project )


Even if I put specifically android in this post title may be other platforms may have this issue. The solution was simple one but I learnt many good practises and tips when I was searching for the solution.

Good practises you should follow when you working on a Cordova project

1. Update java SDK when you have a major update in java.
2. Update android SDK after every month.
3. Use updated version of Node JS.
4. Check and update your cordova version and plugin versions. ( If you using .NET and cant remove excising plugins  please follow safe plugin removal steps in this guide )


Remove plugins safely in .NET cordova project 

Sometimes dot net does not allow you to remove some of cordova plugins. In this case try to remove plugin from config.xml using xml text editor. Make sure once you remove the plugin line you also need to remove the plugin folders . Please refer following screen shots.










Problem with new camera plugin version 2.4.0

To fix this simply you will need to update you cordova-plugin-compat to version 1.1.0 which has the old version number of 1.0.0 . 

cordova-plugin-camera and cordova-plugin-geolocation are depend on compat plugin. So you may need to remvoe those two plugins before you upgrade compat plugin.




No comments:

Post a Comment