Android build failed with cordova-whitelist-plugin

I'm new to the cordova, I'm using a couple of plugins for cordova and one of them is Whitelist plugin. When i add the whitelist plugin to my cordova project and running on android device from eclipse the following errors i'm getting.

-compile:
   [javac] Compiling 31 source files to D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\bin\classes
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:42: error: no suitable method found for parse(Context)
   [javac]         new CustomConfigXmlParser().parse(context);
   [javac]                                    ^
   [javac]     method ConfigXmlParser.parse(XmlResourceParser) is not applicable
   [javac]       (actual argument Context cannot be converted to XmlResourceParser by method invocation conversion)
   [javac]     method ConfigXmlParser.parse(Activity) is not applicable
   [javac]       (actual argument Context cannot be converted to Activity by method invocation conversion)
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:46: error: no suitable method found for parse(XmlPullParser)
   [javac]         new CustomConfigXmlParser().parse(xmlParser);
   [javac]                                    ^
   [javac]     method ConfigXmlParser.parse(XmlResourceParser) is not applicable
   [javac]       (actual argument XmlPullParser cannot be converted to XmlResourceParser by method invocation conversion)
   [javac]     method ConfigXmlParser.parse(Activity) is not applicable
   [javac]       (actual argument XmlPullParser cannot be converted to Activity by method invocation conversion)
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:64: error: no suitable method found for parse(Context)
   [javac]             new CustomConfigXmlParser().parse(webView.getContext());
   [javac]                                        ^
   [javac]     method ConfigXmlParser.parse(XmlResourceParser) is not applicable
   [javac]       (actual argument Context cannot be converted to XmlResourceParser by method invocation conversion)
   [javac]     method ConfigXmlParser.parse(Activity) is not applicable
   [javac]       (actual argument Context cannot be converted to Activity by method invocation conversion)
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:69: error: method does not override or implement a method from a supertype
   [javac]         @Override
   [javac]         ^
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:106: error: method does not override or implement a method from a supertype
   [javac]         @Override
   [javac]         ^
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:111: error: method does not override or implement a method from a supertype
   [javac]     @Override
   [javac]     ^
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:119: error: method does not override or implement a method from a supertype
   [javac]     @Override
   [javac]     ^
   [javac] D:\software\eclipse\configuration\org.eclipse.osgi\1099\data\proj_gen\GoFindoMobile\android\src\org\apache\cordova\whitelist\WhitelistPlugin.java:130: error: method does not override or implement a method from a supertype
   [javac]     @Override
   [javac]     ^
   [javac] Note: Some input files use or override a deprecated API.
   [javac] Note: Recompile with -Xlint:deprecation for details.
   [javac] 8 errors

BUILD FAILED

When i'm not using the White list plugin Its compiling normally.

I had the the same exact problem and this is how I solved it in my case:

  • first update ios-sim: npm install ios-sim
  • create a folder called org.apache.cordova.inappbrowser in platforms/ios/yourAppName/Plugins
  • go to plugins/org.apache.cordova.inappbrowser/src/android folder and copy the CDVInAppBrowser.h and CDVInAppBrowser.m files to the folder you created earlier (platforms/ios/yourAppName/Plugins/org.apache.cordova.inappbrowser)
  • try to build again and it should be OK