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

  1. Create React Native Project with npx init (version 0.72.0)
  2. Install react-native-reanimated following the instruction (version 3.0.0 or 3.3.0)
  3. 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)

Most upvoted comments

* 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 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 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!

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

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/

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 using rm -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.