[TIMOB-7472] Android: APK includes both Javascript runtimes libraries regardless of the chose runtime
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-02-14T23:29:05.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2012-03, Release 2.0.0, Release 1.8.2 |
Components | Android |
Labels | module_build, qe-testadded |
Reporter | Marshall Culpepper |
Assignee | Josh Roesslein |
Created | 2012-01-30T12:56:36.000+0000 |
Updated | 2012-02-14T23:29:05.000+0000 |
Description
It looks like we're including both the Rhino js.jar (via classes.dex) and the 2 V8 ABI-specific shared libraries (libkroll-v8.so, libstlport_shared.so) regardless of which runtime was chosen for the application in the tiapp.xml. We should only bundle the runtime that is given by the
ti.android.runtime
property in the tiapp.xml, or only bundle V8 by default.
For V8 we should still be bundling both ABI-specific variations of the libraries in armeabi
and armeabi-v7a
folders.
Q&A issue:
http://developer.appcelerator.com/question/131313/why-are-both-rhino-and-v8-bundled-in-the-apk
We should probably provide an option to the developers to chose a specific ABI version if they know their target devices. By default, we should include both.
Created TIMOB-7474 to adding an ABI option.
Would it not be possible to reduce deployed .apk size further by providing the option to only use the armeabi libraries? Maybe I don't understand the issues, of course -- but I was under the impression that the main thing you'd be giving up would be FPU support. For apps that don't depend much on FPU support, there would be a substantial space savings. Or do I have this completely wrong?
@KT I opened TIMOB-7474 to add an option for selecting which ABIs to support in your APK.
KT, in the Q/A ticket you said the Rhino library was getting included into the final APK's dex file. I tried reproducing this against the latest master by creating a deployment APK. Using dexdump I don't see any of the Rhino classes being included when using V8 runtime. Could you verify this issue still occurs and if so any details I could use to reproduce it? Thanks,
Fail test case: 1. Select Rhino runtime. 2. Package application into APK (deploy). 3. unzip -l the APK Actual: The lib/ folder contains libkroll-v8 native libraries. Expected: No native libraries should be found in the lib/ folder.
Yeah, I think I may have been wrong on that one. It may be that the V8 libraries are getting included regardless, but Rhino also only gets included (appropriately) for a Rhino build.
[Pull request #1365](https://github.com/appcelerator/titanium_mobile/pull/1365) sent to resolve issue.
Verified fixed with SDK 1.9.0.v20120207000134 using rhino packaged APKs.