Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The output of intel XDK (.apk) is too large ! (android)

i wanna build a web base android application with intel XDK! i tried but the output apk file is too large, My files are totaly 2.4MB but the output is 15.6Mb ! What should I do ?

like image 444
Hosein Avatar asked Oct 02 '22 09:10

Hosein


2 Answers

As @HoseinBL indicates, 15.6MB is not that large for a typical APK.

Which Android build are you using? There are actually three available in the current XDK build system. If you're using the one labeled just "Android" the comments above from @Brad Hill and @Tangocoder apply. If you need to use the Canvas API (aka AGI) or the Cordova API you need to build using the "Gold" option. If you only use the Intel XDK API (intel.xdk and appmobi namespaces) you can use the "Lean" option for a slightly smaller APK.

The Crosswalk for Android build will create at minimum a 15MB package, since this option includes a replacement webview that requires a lot of space.

We are in the process of finalizing a 100% Cordova-compatible build (current called "Cordova for Android") that will generate smaller APKs, but it isn't quite ready for prime-time (thus the reason for the "Beta" tag).

like image 152
xmnboy Avatar answered Oct 13 '22 11:10

xmnboy


For now, Crosswalk build is best solution for android app from Intel XDK, however file is very big. I have game all assets and code ~4 mb, where compiled apk with Crosswalk is 22mb, and installed on device is 50mb! This is too large, but with Crosswalk everything works. Sound, events, fullscreen, orientation and other functions.

If you need file smaller, use Cordoba build. With same game files my apk is ~4.7mb only, that's difference. Bad news, Cordoba build is beta and rather alpha. With this build can be problem with sound on older android versions and some devices. For example, on my device with android 4.0.4 I have no sound where on newest versions sound mostly working.

like image 24
Dudeist Avatar answered Oct 13 '22 11:10

Dudeist