software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.01k stars 1.3k forks source link

Task :react-native-reanimated:buildCMakeDebug[armeabi-v7a] FAILED #6159

Closed justinmihigo closed 4 months ago

justinmihigo commented 4 months ago

Description

I am trying to build an apk using command npx expo run:android but react-native-reanimated is being an issue and here is the error I am getting. with the following tools I am using with Android studio

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1m 20s 799 actionable tasks: 47 executed, 752 up-to-date Error: /Users/justinmihigo/Movies/Andela/commanders-rn-medica/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86,armeabi-v7a exited with non-zero code: 1 Error: /Users/justinmihigo/Movies/Andela/commanders-rn-medica/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86,armeabi-v7a exited with non-zero code: 1 at ChildProcess.completionListener (/Users/justinmihigo/Movies/Andela/commanders-rn-medica/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23) at Object.onceWrapper (node:events:633:26) at ChildProcess.emit (node:events:518:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) ... at spawnAsync (/Users/justinmihigo/Movies/Andela/commanders-rn-medica/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23) at spawnGradleAsync (/Users/justinmihigo/Movies/Andela/commanders-rn-medica/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:96:48) at assembleAsync (/Users/justinmihigo/Movies/Andela/commanders-rn-medica/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:74:18) at runAndroidAsync (/Users/justinmihigo/Movies/Andela/commanders-rn-medica/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:45:37)

Steps to reproduce

  1. Clone the repo
  2. Install the packages using npm install
  3. Then run npx expo run:android or npm run android
  4. Make sure you have the tools needed android studio, java, ndk, and cmake

Snack or a link to a repository

https://github.com/justinmihigo/facebook-login-rn/tree/master

Reanimated version

3.10.1

React Native version

50.0.14

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo Go

Architecture

Fabric (New Architecture)

Build type

Release app & dev bundle

Device

Android emulator

Device model

Pixel_4 Android 11

Acknowledgements

Yes

justinmihigo commented 4 months ago

I am closing this issue this problem was resolved when I installed NDK version 26.1.10909125

SanjaySargam commented 1 month ago

Still having same problem

ndukachukz commented 1 month ago

Still having same problem

Hello, I am having the same problem. were you able to fix?

justinmihigo commented 1 month ago

If you have ndk installed, are changing the value of the ndk version in build.gradle?

ndukachukz commented 1 month ago

If you have ndk installed, are changing the value of the ndk version in build.gradle?

yes I have installed ndk version 26.1.10909125 and I have changed ndkVersion in build.gradle to match that. i also reinstalled reanimated but that did not work either

ndukachukz commented 1 month ago

what fixed mine was enabling the Win32 long path flag from registry https://github.com/software-mansion/react-native-reanimated/issues/6224#issuecomment-2228700164

or just copy to root drive dir. example: C:\projects\react-native-project