mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
abb81eb270
Summary: This allows everyone to deploy significantly smaller APKs to they Play Store by building separate APKs for ARM, x86 architectures. For a simple app, a release APK minified with Produard: - Universal APK is **7MB** - x86 APK is **4.6MB** (34% reduction) - ARM APK is **3.7MB** (47% reduction) Created a sample project, uncommented `// include "armeabi-v7a", 'x86'`: cd android ./gradlew assembleDebug Three APKs were created, unzipped each: one has only x86 binaries, one has ARM binaries, one has both. ./gradlew assembleRelease Three APKs were created, JS bundle is correcly added to assets. react-native run-android The correct APK is installed on the emulator and the app runs fine (Gradle output: "Installing APK 'app-x86-debug.apk'"). With the line commented out the behavior is exactly the same as before, only one universal APK is built. Checked that version codes are set correctly as described in http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits http://developer.android.com/intl/ru/google/play/publishing/multiple-apks.html Closes https://github.com/facebook/react-native/pull/5160 Reviewed By: svcscm Differential Revision: D2811443 Pulled By: mkonicek fb-gh-sync-id: 97b22b9cd567e53b8adac36669b90768458b7a55