I am trying to run my React Native project on Android using:
npx react-native run-android
But I keep getting the following build error:
> Task :react-native-reanimated:configureCMakeDebug[arm64-v8a] FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]'.
> java.io.FileNotFoundException:
D:\engineeringform2025\demo\node_modules\react-native-reanimated\android.cxx\Debug\6q4c3u65\arm64-v8a.cmake\api\v1\query\client-agp\codemodel-v2
(Access is denied)
I’ve already tried:
- Deleting the .cxx and .gradle folders and rebuilding
- Running gradlew clean
- Running the terminal as Administrator
But the error still happens.
OS: Windows 10
React Native version: 0.81.4
"@react-native/new-app-screen": "0.81.4",
"react": "19.1.0",
"react-native": "0.81.4",
"react-native-reanimated": "^4.1.0",
"react-native-safe-area-context": "^5.5.2",
"react-native-worklets": "^0.5.1"
I tried running npx react-native run-android after cleaning the project (gradlew clean) and deleting .gradle / .cxx folders. I also ran the terminal as Administrator to avoid permission issues.
I expected the Android app to build and install successfully on the emulator/device.
Instead, the build failed with
Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]' and a FileNotFoundException (Access is denied) error pointing to the .cxx folder inside react-native-reanimated.