Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build failed 'A problem occurred configuring project ':react-native-reanimated'. in React native project

I am trying to run project with command,

npx react-native run-android

and found this as an error: FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\Documents\project\project_Workspace\projectname\node_modules\react-native-reanimated\android\build.gradle' line: 69

  • What went wrong: A problem occurred configuring project ':react-native-reanimated'.

java.io.IOException: The filename, directory name, or volume label syntax is incorrect

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 33s stuck to resolve this error. Help me to resolve this error.

like image 563
Swift Avatar asked Sep 07 '25 23:09

Swift


1 Answers

this problem happened in windows because of slashes

in your project folder navigate to android and open local.properties file

replace

sdk.dir=C:\Users\\<userName>\AppData\Local\Android\Sdk

with

sdk.dir=C:\\Users\\<userName>\\AppData\\Local\\Android\\Sdk

and it will work correctly

like image 160
Hussein AbdElaziz Avatar answered Sep 09 '25 21:09

Hussein AbdElaziz