react-native-reanimated
                                
                                 react-native-reanimated copied to clipboard
                                
                                    react-native-reanimated copied to clipboard
                            
                            
                            
                        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
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.
still the same
can you try with ndk 24.0.8215888?
@efstathiosntonas not working sir, IOS is fine but Android not. this is the error message react-native-reanimated/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp.o cannot be safely placed under this directory. The build may not work correctly. ninja: error: manifest 'build.ninja' still dirty after 100 tries
ok so the error changed to this now? Is this a real path on your mac: /Users/'user'/Library maybe the problem is that user has quotes.
edit: https://visualgdb.com/documentation/cmake/CMAKE_OBJECT_PATH_MAX/
ok so the error changed to this now? Is this a real path on your mac:
/Users/'user'/Librarymaybe the problem is thatuserhas quotes.edit: https://visualgdb.com/documentation/cmake/CMAKE_OBJECT_PATH_MAX/
I just changed my username, and quoted 'user' :D
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.
mine is still not working on Android I am using RN 0.72 and reanimated 3.3.0
mine is still not working on Android I am using RN 0.72 and reanimated 3.3.0
is it 0.72.0 or 0.72.1?
@AllmaG3st 0.72.0 sir,
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
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 from reactNativeArchitectures in android/gradle.properties
* What went wrong: Execution failed for task ':react-native-reanimated:buildCMakeDebug[arm64-v8a]'. Unable to delete file 'C:\Users\Artem\Documents\flashcardseng\node_modules\react-native-reanimated\android\build\intermediates\cxx\Debug\1o6v2eo5\obj\ar m64-v8a'
I swear, someday I'll throw this React Native into the trash bin with all its endless errors in Reanimated.
I will describe all the steps I took to make it work, but I can't say for sure which of them was actually necessary. Firstly, I recreated the project from scratch.
1)npx react-native init AwesomeProject --version 0.72.1
2)add string kotlinVersion = '1.8.10' to "android/build.gradle"
3)Then I immediately installed "reanimated", "gesture-handler"
4)delete the "node_modules" folder
5)Open "VS code" as administrator.
6)npm install
7)npx react-native run-android
Also note my NDK version in "Android studio" is 23.1.77
@TylerJackson please refer this comment
Remove _JAVA_OPTIONS in cimg/android on circleci and it works now
Finally build successfully 👍
here are some changes I have made: Packages & dependencies "@react-navigation/drawer": "^6.6.3", "@react-navigation/native": "^6.1.7", "react": "18.2.0", "react-native": "0.72.1", "react-native-gesture-handler": "^2.12.0", "react-native-reanimated": "^3.4.0", "react-native-safe-area-context": "^4.7.1", "react-native-screens": "^3.23.0"
steps:
- uninstall "react-native-reanimated" and then install this version of RNR 3.4.0
- Installed ndk version "23.1.7779620"
- added ndk path in local.properties file under android like below ndk.dir=C:\Users\kashif\AppData\Local\Android\sdk\ndk\23.1.7779620
- move project to main drive like D: because RNR CMAKE PATH characters should be less than 250.
EXCEPTIONAL Chcange
minSdkVersion from 21 to 23 as i was using status bar so that requires min SDK v=23
Build succeeded. 💯
Finally build successfully +1
here are some changes I have made: Packages & dependencies "@react-navigation/drawer": "^6.6.3", "@react-navigation/native": "^6.1.7", "react": "18.2.0", "react-native": "0.72.1", "react-native-gesture-handler": "^2.12.0", "react-native-reanimated": "^3.4.0", "react-native-safe-area-context": "^4.7.1", "react-native-screens": "^3.23.0"
steps:
- uninstall "react-native-reanimated" and then install this version of RNR 3.4.0
- Installed ndk version "23.1.7779620"
- added ndk path in local.properties file under android like below ndk.dir=C:\Users\kashif\AppData\Local\Android\sdk\ndk\23.1.7779620
- move project to main drive like D: because RNR CMAKE PATH characters should be less than 250.
EXCEPTIONAL Chcange
minSdkVersion from 21 to 23 as i was using status bar so that requires min SDK v=23
Build succeeded. 100
I followed these steps on my linux pc. Didn't work for the first time but after doing this and also unset _JAVA_OPTIONS and it worked for me.
+1 facing same issue
Uninstalling and reinstalling the NDK (23.1.7779620 in my build.gradle), as described here, fixed the error for me.
Uninstalling and reinstalling the NDK (
23.1.7779620in mybuild.gradle), as described here, fixed the error for me.
I tried that severally and it did't work for me
Uninstalling and reinstalling the NDK (
23.1.7779620in mybuild.gradle), as described here, fixed the error for me.I tried that severally and it did't work for me
Didn't worked for me either. It was working fine with RN 0.71.8
In my case I'm trying to use react-navigation and when I run npx react-native start it shows an error about reanimated 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!
I also recommend using the SDK Manager to download the corresponding NDK. You can see its version when you run ./gradlew clean from the "android" folder. Otherwise we don't know if the run android process is blocked or not.
i am new to react-native and i am getting this same problem
what should i do? i tried different things but nothing worked any tip
edit: "react-native-reanimated": "^2.17.0" is working for me
cd to the mentioned ndk directory /Users/'user'/Library/Android/sdk/ndk/23.1.7779620
and then delete it using rm -rf 23.1.7779620
Also an error, but another one.
Task :react-native-reanimated:buildCMakeDebug[armeabi-v7a] FAILEDninja: error: manifest 'build.ninja' still dirty after 100 triesRN 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-v7afromreactNativeArchitecturesinandroid/gradle.properties
@CoonHouse you literally saved my project, thank you
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':react-native-screens'.
[CXX1101] NDK at C:\Users\sanju\AppData\Local\Android\Sdk\ndk\25.1.8937393 did not have a source.properties file I am having this error someone please help
I have the same issue with react native verion 0.74.0
I have the same issue with react native verion 0.74.0
I have resolved the issue you need to delete the sdk/ndk/25.1.8937 and bundle the app again
I have the same issue with react native verion 0.74.0
I have resolved the issue you need to delete the sdk/ndk/25.1.8937 and bundle the app again
Could you please describe it in more detail. I am also facing same issue
