
The android_binary rule can explicitly ask Bazel to build its dependencies inĪn Android-compatible configuration so that the Bazel build just works withoutĪny special flags, except for -fat_apk_cpu and -android_crosstool_top forīehind the scenes, this automatic configuration uses Android configurationĪ compatible rule, like android_binary, automatically changes theĬonfiguration of its dependencies to an Android configuration, so onlyĪndroid-specific subtrees of the build are affected. Toolchain ( name = "x86-clang8.0.7-libcpp_toolchain", toolchain_type =, target_compatible_with =, toolchain =, ) toolchain ( name = "x86_64-clang8.0.7-libcpp_toolchain", toolchain_type =, target_compatible_with =, toolchain =, ) toolchain ( name = "arm-linux-androideabi-clang8.0.7-v7a-libcpp_toolchain", toolchain_type =, target_compatible_with =, toolchain =, ) toolchain ( name = "aarch64-linux-android-clang8.0.7-libcpp_toolchain", toolchain_type =, target_compatible_with =, toolchain =, ) How it works: introducing Android configuration transitions

Use the following flags to build according to a C++ standard: C++ Standard The size of the APK, but can be useful for development and QA builds. Multi-ABI Fat APKs are not recommended for release builds since they increase
Android ndk build for x86 apk#
If more than one ABI is specified, Bazel will build an APK containing a sharedĭepending on the NDK revision and Android API level, the following ABIs areĪrmeabi, armeabi-v7a, arm64-v8a, mips, mips64, x86, x86_64 To create a fat APK for multipleĪrchitectures, you can specify multiple CPUs: -fat_apk_cpu=armeabi-v7a,x86. By default, Bazel builds native Android code for armeabi-v7a.
