Building combined armv7/x86 apk after Crosswalk integration in an Ionic project

Sobhan picture Sobhan · Sep 12, 2015 · Viewed 23k times · Source

I have added Crosswalk to my ionic project. When i do ionic build android it outputs two separate APK files, one for armv7 and one for x86.

However i want one single apk file bundling two architectures together.

I tried setting BUILD_MULTIPLE_APKS = false but it's still building two separate apks.

There is a post here saying :

Took me a minute but you can get the single build file by commenting out the cdvBuildMultipleApks=true line in the platforms/android/gradle.properties

Cheers

But i don't have any gradle.properties file in my platforms/android/ folder, i have a project.properties file and there is no cdvBuildMultipleApks=true line in it to comment out.

I tried to manually create a gradle.properties file and putting cdvBuildMultipleApks=false in there but still two outputs.

Any ideas how to achieve this?

Update:

My Cordova version is 5.1.1

Solution:

What did work for me as suggested by @mudasserajaz and here, was to :

  1. Create a file named build-extras.gradle inside my /platform/android/ directory.
  2. put ext.cdvBuildMultipleApks=false inside it.
  3. ionic build android --release then and Voila, it worked.

@mudasserajaz suggested the same thing except variable name is cdvBuildMultipleApks=false so in case it didn't work out for you, don't forget the ext

Answer

M. Junaid Salaat picture M. Junaid Salaat · Aug 23, 2016

Well I just changed my config.xml following property to false and it combined the build apk.

from

<preference name="xwalkMultipleApk" value="true"/>

to

<preference name="xwalkMultipleApk" value="false"/>

My systems ionic info returns

Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS:
Node Version: v4.4.4