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 ?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Usually image is biggest content in a app and you can compress it with gulp task runner with gulp min
https://github.com/sindresorhus/gulp-imagemin
sample:
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).
When building the application, which code base are you using? The "gold" is the most robust, but that also means it's the largest (with more inclusions). Would your application still work with the lighter "lean" code base?
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.
That's the Intel XDK container packaged with your app, and if you want to use DirectCanvas (developing games for example) you're obligated to use the "gold" code base, which is include all their APIs even if you're not using them. That's sad, yah!
Moreover, with all these APIs built with your app, the app will require a lot of permissions on device when installed, and there's nothing to do about it (not that I know of).