Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7472] Android: APK includes both Javascript runtimes libraries regardless of the chose runtime

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-14T23:29:05.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2012-03, Release 2.0.0, Release 1.8.2
ComponentsAndroid
Labelsmodule_build, qe-testadded
ReporterMarshall Culpepper
AssigneeJosh Roesslein
Created2012-01-30T12:56:36.000+0000
Updated2012-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

Comments

  1. Neeraj Gupta 2012-01-30

    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.
  2. Josh Roesslein 2012-01-30

    Created TIMOB-7474 to adding an ABI option.
  3. KT 2012-01-31

    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?
  4. Josh Roesslein 2012-02-06

    @KT I opened TIMOB-7474 to add an option for selecting which ABIs to support in your APK.
  5. Josh Roesslein 2012-02-06

    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,
  6. Josh Roesslein 2012-02-06

    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.
  7. KT 2012-02-06

    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.
  8. Josh Roesslein 2012-02-06

    [Pull request #1365](https://github.com/appcelerator/titanium_mobile/pull/1365) sent to resolve issue.
  9. Eric Merriman 2012-02-07

    Verified fixed with SDK 1.9.0.v20120207000134 using rhino packaged APKs.

JSON Source