Here’s a step-by-step guide on how I effectively tackled the requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager
error that arose during an Android development project using React Native:
1. Identify the Error: Run ./gradlew build in the project’s android directory. This command attempts to build the project and often unveils the root cause of the error, in this case, it was CXX1101] NDK at ~/Library/Android/sdk/ndk/25.1.8937393 did not have a source.properties file
. Which meant that there was a missing source.properties file within the NDK.
2. Address the Missing File: Navigate to the NDK version folder using the path specified in the error message (e.g., ~/Library/Android/sdk/ndk/25.1.8937393). Since the source.properties file is likely corrupt or incompatible, delete this entire NDK version folder.
3. Clean and Rebuild: Return to the project’s android directory and execute ./gradlew clean
to remove any leftover build artifacts. Finally, run ./gradlew build
again to initiate a fresh build process with the corrected NDK setup.
Additional Considerations:
- If the issue persists after these steps, it might be necessary to reinstall or update the NDK using the Android SDK manager.
- Double-check your React Native and NDK version compatibility to ensure they align with project requirements.
Discover more from Coursity
Subscribe to get the latest posts sent to your email.