Alex Hang
Alex Hang

Reputation: 87

Cordova CLI Android build error

I am building an app using INTEL XDK. When I build the app using the Intel Cloud building system, everything is working ok, and I am able to install the app on my phone. The problem is, the build service will be retired this summer, and I need to build the app using Cordova CLI. Every time I try to build the app, i have the error from the bellow screenshot( the same app is building without errors using intel cloud building service). this is the error

Note: I have Java 1.8 installed, that is not the problem.

Upvotes: 0

Views: 136

Answers (1)

xmnboy
xmnboy

Reputation: 2310

I suspect this is due to having installed the latest version of Cordova CLI and/or the latest version of the cordova-android framework (what you get when you use the command cordova platform add android). My recollection is that with the latest versions of those items you may need to use the latest version of the Crosswalk plugin.

If you look in the config.xml file you'll see that a specific version of Crosswalk is being requested (probably 19), the last version produced is 23. If you remove the version specifier for the Crosswalk plugin inside the config.xml file you'll get the latest. I'd try that to see if it resolves the issue or simply remove Crosswalk from your Build Settings and create a new config.xml and see if it builds without Crosswalk.

If you are only targeting Android 5+ devices you don't really need to be using Crosswalk. If you are targeting Android 4.4+ devices and your UI and JavaScript features are not terribly complex you can also stop using Crosswalk. Crosswalk is most useful for targeting Android 4.x devices, newer devices (Android 5 and greater) do not need it for the vast majority of apps.

Also I would be curious if the exported package buildss with PhoneGap Build, since the config.xml file that is created specifies specific CLI and plugin versions, which should work as expected there. Unlike using Cordova CLI, where you only have one version of the build tools, you have access to many versions of the build tools on PhoneGap Build, and the config.xml that is generated is very specific, just as the XDK build system is. So I would expect a build on PhoneGap Build to work, which would point to further evidence that the version of CLI you are running is what's creating the conflict.

Upvotes: 1

Related Questions