Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27752] Android: Exclude x86 and x86_64 architectures in "production" builds by default

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2020-02-13T23:51:32.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.0
ComponentsAndroid
Labelsandroid, architecture, build, production, x86, x86_64
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-07T02:45:18.000+0000
Updated2020-03-30T13:59:54.000+0000

Description

*Summary:* When doing a "production" build, the x86 and x86_64 architectures should be excluded from the built Android app by default. That is, only ARM architectures should be included. *Note 1:* We have been excluding x86 from "production" builds since Titanium 7.0.0. We want to maintain this behavior in Titanium 9.0.0's gradle builds and exclude x86_64 as well. These architectures are mostly needed for testing purposes in the Android emulator. Removing these architectures can reduce the APK size by a significant amount. Also, physical Android device that support x86 are extremely rare. *Note 2:* Modules built with Titanium 8.x.x and older do not support the x86_64 architecture. Only modules built with Titanium 9.0.0 and higher support x86_64. When you include a module that does *+NOT+* support x86_64 into a Titanium 9.0.0 or newer app, then the build system will strip out all x86_64 architectures from the app. It's all or nothing, otherwise a crash will occur on an x84_64 device/emulator. This means if you want your app to support x86_64, then all modules must be built with Titanium 9.0.0 or higher. *How to Override:* You can override this behavior and specify which architectures you want to include in the build by adding the following <abi/> entry in the "tiapp.xml" file.
<ti:app xmlns:ti="http://ti.appcelerator.org">
	<android>
		<abi>armeabi-v7a,arm64-v8a,x86,x86_64</abi>
	</android>
</ti:app>

Comments

  1. Joshua Quick 2020-02-07

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11466
  2. Satyam Sekhri 2020-02-10

    FR Passed. 1. When performing a test/development build of a mobile project the apk generated includes all four architectures (arm64-v8a, armeabi-v7a, x86, x86_64) 2. When performing a production build of a mobile project the apk generated has arm64-v8a, armeabi-v7a architectures. 3. When performing a production build of a mobile project and including information for all 4abi's in Tiapp.xml the apk generated includes all four architectures. 4. When the mobile project uses any module that uses SDK prior to 9.0 then the test/development/production build for the mobile project excludes the x86_64 architecture. Also a warning message is logged in the build logs.
  3. Satyam Sekhri 2020-02-10

    Waiting on Jenkins build
  4. Satyam Sekhri 2020-02-13

    Verified on: Mac OS: 10.15.1 SDK: 9.0.0.v20200212155006 Appc CLI: 8.0.0-master.6 JDK: 11.0.4 Node: 10.16.3

JSON Source