react-native-keys icon indicating copy to clipboard operation
react-native-keys copied to clipboard

fix: Ensure correct ABI filtering in CMake configuration

Open AnassHmida opened this issue 1 year ago • 0 comments

This commit updates the build.gradle file to dynamically determine ABI filters based on project requirements. Instead of relying on static ABI configurations, the reactNativeArchitectures() function is introduced to fetch ABI filters from project properties or default to a standard set when not specified. This ensures that only the necessary ABIs are processed during the build, addressing issues related to incorrect ABI configurations.

Changes include:

  • Introduced reactNativeArchitectures() function to fetch ABI filters dynamically.
  • Updated cmake block in build.gradle to use abiFilters (*reactNativeArchitectures()).

This resolves issues where CMake attempted to build unnecessary ABIs, improving build efficiency and reliability.

To test this change:

  1. Ensure your development environment has React Native dependencies installed and configured.
  2. Run the project build with various Android ABIs (e.g., armeabi-v7a, arm64-v8a, x86, x86_64) using different build configurations (debug and release).
  3. Verify that the build process completes successfully without attempting to build unsupported architectures and that the correct ABI is selected based on the project's configuration. Pay special attention to scenarios involving --active-arch to ensure correct ABI detection.

AnassHmida avatar Jun 27 '24 12:06 AnassHmida