{ "id": "171082", "key": "TIMOB-26373", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-03-24T03:38:03.000+0000", "created": "2018-02-12T04:43:53.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "57989", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172389", "key": "TIMOB-26434", "fields": { "summary": "Android: Support building \"app bundles\"", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-03-24T03:38:03.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Since Ti SDK 7.0.0, the performance of the app on arm64-v8a devices has increased notably but at the same time the size of the produced apk files have become much larger due to the one apk file containing native libs for all 3 platforms: arm64-v8a, armeabi-v7a and x86.\r\n\r\nIt would be good to have an option to produce split apk's based on the respective 3 architecture (in addition to the one big .apk which has the all native libs for all 3 platforms).\r\n\r\ne.g.)\r\nCurrent Build Output:\r\nMyApp.apk (100MB)\r\n\r\nDesired:\r\nMyApp.apk (100MB)\r\nMyApp_arm64-v8a.apk (50MB)\r\nMyApp_armeabi-v7a.apk (50MB)\r\nMyApp_x86.apk (50MB)\r\n", "attachment": [], "flagged": false, "summary": "Android: Option to split apk's produced from builds based on CPU architecture arm64-v8a armeabi-v7a x86", "creator": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "environment": null, "comment": { "comments": [ { "id": "435015", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~fahad86] It is currently possible to build for specific abis using the abi tag under the android section of the tiapp.xml. Take a look at https://www.appcelerator.com/blog/2017/07/optimising-titanium-app-file-sizes/ and http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-src-29004921_tiapp.xmlandtimodule.xmlReference-abi", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-02-28T17:50:09.000+0000", "updated": "2018-02-28T17:50:09.000+0000" }, { "id": "435044", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "@Ewan Harris, thanks for the info. Would it be possible to output all binaries in the same build rather than building individually for each architecture manually?\r\n\r\ne.g. \r\n arm64-v8a\r\n armeabi-v7a\r\n x86\r\n all\r\n", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-03-01T06:50:35.000+0000", "updated": "2018-03-01T06:51:53.000+0000" }, { "id": "435045", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "I assume that the android version code will need to be bumped manually :(", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-03-01T07:15:35.000+0000", "updated": "2018-03-01T07:15:35.000+0000" }, { "id": "435046", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Or we can tie an android version code to each abi element\r\n\r\ne.g.)\r\nall\r\nx86\r\narmeabi-v7a\r\narm64-v8a\r\n", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-03-01T07:19:29.000+0000", "updated": "2018-03-01T11:26:50.000+0000" }, { "id": "437269", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You really only need the ARMv7 architecture when releasing your APK.\r\nARM64 devices support running ARMv7.\r\nAnd x86 Atom devices are rare, but I do know they can run ARMv7 apps via \"libhoudini\" through emulation.\r\n\r\nYou can also specify multiple architectures in your \"tiapp.xml\" to pick and choose which architectures you want like the below. This excludes the x86 architecture and keeps ARMv7 and ARM64.\r\n{code:java}\r\n\r\n \r\n armeabi-v7a,arm64-v8a\r\n \r\n\r\n{code}\r\n\r\nAlternatively, if you only want the x86 and ARMv7 architectures like how it worked before Titanium 7.0.0, then you can do this...\r\n{code:java}\r\n\r\n \r\n armeabi-v7a,x86\r\n \r\n\r\n{code}\r\n\r\n_Thanks goes to [~gmathews] for testing out the above and proving that it works._", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-01T22:45:05.000+0000", "updated": "2018-05-01T22:45:30.000+0000" }, { "id": "437354", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~fahad86], Please follow up with the guide provided by Joshua Quick above. Let us know the how it went. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-05-04T00:51:49.000+0000", "updated": "2018-05-04T00:51:49.000+0000" }, { "id": "437357", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Hello. Thanks for the suggestion. One of the main reasons I separate apk's is that it makes the download size of the app smaller (hopefully) prompting more storage space conscious users to download the app. Also I've noticed a slight improvement in app performance with the inclusion of arm64-v8a native libs.\r\n\r\nBut I also understand that building all apks at once would require a lot of manual work on the user side like maintaining version numbers which wouldn't be an ideal user experience.\r\n\r\nCurrently this is what I do:\r\n\r\n\r\n{code:xml}\r\n x86\r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n\r\nI build for each abi (top to bottom) increasing the android:versionCode with each build. It's quite a manual and lengthy process but works fine for me.\r\n\r\nPlease feel free to close this item/thread.\r\n\r\nThanks and Regards", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-05-04T02:43:10.000+0000", "updated": "2018-05-04T02:44:21.000+0000" }, { "id": "437385", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~fahad86], thanks for your feedback. This is definitely a good thing to discuss.\r\n\r\nI know that gradle supports generating multiple APKs for each architecture (as well as by density to split image resources). I've never split it by architecture before, but my understanding is if you do create a universal APK that supports all architectures as well as separate APKs per architecture, then the universal APK has to be assigned a separate versionCode, right? That is, you can't have a universal APK that has the same versionCode as APKs having individual architectures. You said you have to increment the versionCode for each abi build, so, I assume this has been your experience.\r\n\r\nAlthough my understanding is if you don't create a universal APK, then each APK split by abi can use the same versionCode.\r\n\r\nIf you can share your personal experience with this, then that would be great. Personally, I've always preferred the convenience of having 1 universal APK from a testing/support standpoint. But I can understand the argument of reducing the download/install size of an APK as well.\r\n\r\nAlso, if we were to support building multiple APKs by architecture, would you be okay with us limiting it to production/release builds? That is, test/development builds would never be split and always universal. I'm thinking this because our current build/run process via Appcelerator Studio or the \"appc run\" command line really only expects one APK and I don't want us to overcomplicate it.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-04T18:04:04.000+0000", "updated": "2018-05-04T18:04:04.000+0000" }, { "id": "437447", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Thanks Joshua. I wasn't aware that we can use the same version number for different architecture builds. Thanks!\r\n\r\nI used to build the 'all' .apk to serve it via CDN servers (rather than Google PlayStore). But I realised that I can upload the \"armeabi-v7a\" version instead as it would be compatible with all devices.\r\n\r\nI would only want multiple apk's to be built before deploying to the PlayStores and NOT during development.\r\n\r\nThanks and Regards", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-05-08T02:21:31.000+0000", "updated": "2018-05-08T02:22:18.000+0000" }, { "id": "437805", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Looks like we've got something new from Google to look into:\r\n\r\nApp Bundle: https://developer.android.com/guide/app-bundle/", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-05-21T08:28:22.000+0000", "updated": "2018-05-21T08:28:22.000+0000" }, { "id": "437818", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah, that's good timing on Google's part. Looks like exactly what we need.\r\n\r\nAlthough we need to test how well it works on Android 4.x since those older OS versions do not support multiple APKs for a single app. Google states (quote below) that they combine the APKs into a single APK for older OS versions. I hope that works well.\r\n\r\nbq. for devices running Android 4.4 (API level 20) and lower, Google Play automatically serves a single APK that’s optimized for the device's configuration.\r\n\r\nIt looks like the only downside with using \"Android App Bundles\" is you can't use Google Play \"Expansion Files\". Meaning that the grand total of all of your split APKs can't exceed 100 MB. I know Titanium doesn't directly support expansion files (there is a 3rd party module though), but I'd like to keep the door open for us to possibly support it in the future. Other than that, I think Android App Bundles is a good solution.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-21T19:32:54.000+0000", "updated": "2018-05-21T19:32:54.000+0000" }, { "id": "454825", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "This issue can be *closed* as we have app bundles now.", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2020-03-24T02:43:05.000+0000", "updated": "2020-03-24T02:43:05.000+0000" }, { "id": "454828", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the reminder [~fahad86].\r\n\r\nAs of Titanium 9.0.0, we now support app bundles (ie: {{\\*.AAB}} files).\r\nSee [TIMOB-26434] for details.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-24T03:37:41.000+0000", "updated": "2020-03-24T03:37:41.000+0000" } ], "maxResults": 22, "total": 22, "startAt": 0 } } }