skip to Main Content

dependencies with version used in myProject are :
gradle : 8.0.1
"react-native-reanimated": "^3.4.1", // I think this is causing the issue

Task :react-native-reanimated:buildCMakeDebug[arm64-v8a] FAILED
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.

CMake Warning in CMakeLists.txt:
The object file directory

  C:/Users/node_modules/react-native-reanimated/android/.cxx/Debug/c5f614v4/arm64-v8a/CMakeFiles/reanimated.dir/./

has 198 characters.  The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX).  Object file

  C_/Users/node_modules/react-native-reanimated/Common/cpp/NativeModules/NativeReanimatedModule.cpp.o

cannot be safely placed under this directory.  The build may not work
correctly.

I have deleted node_modules and installed it with npm install –force, also try to run project with npm start — –reset-cache

2

Answers


  1.     module.exports = {
         presets: ['module:metro-react-native-babel-preset'],
         plugins: [[
         'react-native-reanimated/plugin',
         ]],
        }
    

    Add react-native-reanimated in plugin, File name: babel.config.js

    Login or Signup to reply.
  2. you can use different version of react-native-reanimated

    "react-native-reanimated": "2.2.4",
    

    also set the babel.config.js

    module.exports = {
      presets: ['module:metro-react-native-babel-preset'],
      plugins: ['react-native-reanimated/plugin'],
    };
    

    in iOS podfile write this line as well

    pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search