Problems with whitelist plugin and android (first try)


#1

am developing am app that works great for iOS, using ionic. In trying to test for Android for the first time by doing ionic build android and it compiled fine. When I installed it on my android device, I noticed all network access was prohibited. On further investigation, I read I needed to add the whitelist plugin

The steps I followed:

project root:

ionic ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git

(at my project root) Then, I added the following to config.xml:

<access origin="*"/>
<allow-navigation href="*"/>
<allow-intent href="*"/>

When I do an ionic build android, I now get a compilation error:

projects/phonegap/zmNinja/platforms/android/src/org/apache/cordova/whitelist/WhitelistPlugin.java:42: cannot find symbol
symbol  : method parse(android.content.Context)
location: class org.apache.cordova.whitelist.WhitelistPlugin.CustomConfigXmlParser
        new CustomConfigXmlParser().parse(context);

Incidentally, I also get various warnings (which occurred before as well, but did not affect app compilation) of the sort:

 major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.

Can someone advice on how I fix that parsing error? I’m very new to Android with ionic.

Info:

OS: Mac OS X Yosemite
Node Version: v0.12.1
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.18
Xcode version: Xcode 6.3.1 Build version 6D1002 
ios-sim version: 3.1.1 
ios-deploy version: Not installed

I also have Android SDK version 21 & 22 installed. I believe cordova needs 21.


#2

Solved the problem. The error was due to crosswalk.
Updated ionic CLI, upgraded cordova to 5, removed the cross walk plugin, added it back and compilation works