react-native-reanimated: Can not build Android with react-native version 0.72.0
Description
After installing Reanimated 3 (versions 3.0.0 and 3.3.0 were tried) android app does not build any more.
Attempt to build the app from VS code just stuck on
info JS server already running.
Attempt to build from Android Studio gives this at first
Configure project :react-native-reanimated No AAR for react-native-reanimated found. Attempting to build from source.
and then error:
[CXX1101] NDK at /Users/'user'/Library/Android/sdk/ndk/23.1.7779620 did not have a source.properties file
Steps to reproduce
- Create React Native Project with npx init (version 0.72.0)
- Install react-native-reanimated following the instruction (version 3.0.0 or 3.3.0)
- Try to build on Android.
Snack or a link to a repository
https://github.com/AllmaG3st/RN-Weather-Quest
Reanimated version
3.0.0
React Native version
0.72.0
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Real device
Device model
Any
Acknowledgements
Yes
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 7
- Comments: 27 (2 by maintainers)
I swear, someday I’ll throw this React Native into the trash bin with all its endless errors in Reanimated.
I have had the same issue. Try to clean gradlew (cd android && call gradlew clean && ./gradlew cleanBuildCache && cd …) Also, rm node_modules and npm i just in case… & use the reanimated 3.3.0
It worked on my app, but I had other issues with 3rd party libs so I decided to stay on 0.71.
Also not working for me with error - RN 0.72.3 RNR 3.3 It does work locally for me but not from our CI machine for android.
hermeseEnabled=true/false newArchEnabled=false
buildToolsVersion = “33.0.0” minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 kotlinVersion = “1.8.20” ndkVersion = “23.1.7779620”
Execution failed for task ‘:react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]’. @kmagiera @piaskowyk @tomekzaw
In my case I’m trying to use react-navigation and when I run
npx react-native start
it shows an error aboutreanimated
and the message:[CXX1101] NDK at /Users/'user'/Library/Android/sdk/ndk/23.1.7779620 did not have a source.properties file
To solve this, I opened my Android Studio > More Actions > SDK Manager > Languages & Frameworks > Android SDK > SDK Tools and I selected the NDK version 24.0.8215888 and unchecked other versions. Then
Apply
and ran the react-native project again. It works!Also an error, but another one.
Task :react-native-reanimated:buildCMakeDebug[armeabi-v7a] FAILED
ninja: error: manifest 'build.ninja' still dirty after 100 tries
RN 0.72.3 RNR 3.3.0 (New project) buildToolsVersion = “33.0.0” minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 ndkVersion = “23.1.7779620”
Update: Tried some other versions of RNR with RN 0.72.3 Until 2.17.0 it is working, as of 3.0.0 it goes wrong.
Update: I was able to get RNR 3.3.0 working with RN 0.72.3 by removing
armeabi-v7a
fromreactNativeArchitectures
inandroid/gradle.properties
I just changed my username, and quoted ‘user’ 😄
cd to the mentioned ndk directory
/Users/'user'/Library/Android/sdk/ndk/23.1.7779620
and then delete it usingrm -rf 23.1.7779620
So, I think I found out the reason, I started completely new project with updated Node version, previously I was using 16.20.0, I upgraded to 18.16.0 and now it works.