ninja: error: '.../react-android-0.82.1-debug/.../libreactnative.so', needed by .../libworklets.so, missing and no known rule to make it
Description
After upgrading my project from React Native 0.75.3 β React Native 0.82.1, the Android build started failing when using react-native-reanimated (and its react-native-worklets dependency).
The CMake/Ninja build fails with this error:
Task :react-native-worklets:buildCMakeDebug[armeabi-v7a][worklets] FAILED ninja: error: '/Users/zezo/.gradle/caches/9.0.0/transforms/.../react-android-0.82.1-debug/prefab/modules/reactnative/libs/android.armeabi-v7a/libreactnative.so', needed by '../../../../build/intermediates/cxx/Debug/.../obj/armeabi-v7a/libworklets.so', missing and no known rule to make it
It seems libreactnative.so for the armeabi-v7a ABI is not generated or included in the react-android prefab for React Native 0.82.1.
React Native version: Before: "react-native": "0.75.3" Now: "react-native": "0.82.1"
Reanimated version: "react-native-reanimated": "^4.1.3",
Environment
macOS: 15.6.1 Android Gradle Plugin: 9.0.0 NDK: 27.1.12297006 CMake: 4.1.1 JDK: 17.0.17
Steps to reproduce
- Start with a React Native 0.75.3 app (works fine).
- Upgrade to React Native 0.82.1.
- Install react-native-reanimated and react-native-worklets.
- Run npx react-native run-android.
- Build fails at: react-native-worklets:buildCMakeDebug[armeabi-v7a][worklets]
Snack or a link to a repository
private repo (not share publicly)
Reanimated version
4.1.3
Worklets version
0.6.1
React Native version
0.82.1
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
Debug app & dev bundle
Device
Real device
Host machine
macOS
Device model
vivo y200
Acknowledgements
No
Hi @Naresh-Dhamu, thanks for reporting this issue.
Please try removing all build artifacts (with rm -rf node_modules android/build android/app/build android/.cxx android/app/.cxx or with git clean -fdX β note that this will remove all untracked files, including things like .env etc.) and try to build the app again.
I've been having this issue consistently with a bunch of apps on several machines. Removing node_modules and the android directory doesn't fix it.
I have a repo that consistently fails on my 2 laptops. I have a lot more that fail, but this one is public.
New expo apps seem to work.
I tried a bunch of things, like removing ~/.gradle, updating my Android SDKs to the latest, updating Node version, but nothing seems to help.
Happy to provide any more details. Any suggestions or things I could try would be really helpful. π
β ~ node --version
v24.5.0
β ~ pnpm --version
10.20.0
β sandbox git clone https://github.com/beeman/test-expo-web3js-wallet-ui test-app
β sandbox cd test-app
β test-app git:(main) pnpm install
β test-app git:(main) pnpm run android
Full output can be seen in this gist: https://gist.github.com/beeman/3ac09000727f2e95b9b786582745a149
I created this script that gets me into the error state directly. @Naresh-Dhamu curious to hear if this is the same for you π
Here is the full output from the Android build.
The repo with the generated project is here
β sandbox ~/dev/beeman/expo-reanimated-build-issue/clean-expo-app.sh
App name : app-2025-11-25-03-11-48
Package manager : pnpm
----------------------------------------
Running install command : 'pnpm create expo-app@latest app-2025-11-25-03-11-48'
----------------------------------------
.../19ab8234275-c1be | +1 +
.../19ab8234275-c1be | Progress: resolved 1, reused 1, downloaded 0, added 1, done
Creating an Expo project using the default template.
To choose from all available templates (https://github.com/expo/expo/tree/main/templates) pass in the --template arg:
$ pnpx create-expo-app --template
To choose from all available examples (https://github.com/expo/examples) pass in the --example arg:
$ pnpx create-expo-app --example
β Downloaded and extracted project files.
> pnpm config --location project set node-linker hoisted
> pnpm install
βWARNβ Request took 10473ms: https://registry.npmjs.org/@typescript-eslint%2Ftypes
βWARNβ 3 deprecated subdependencies found: [email protected], [email protected], [email protected]
Packages: +952
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 918, reused 872, downloaded 13, added 952, done
Done in 31.2s using pnpm v10.22.0
β
Your project is ready!
To run your project, navigate to the directory and run one of the following pnpm commands.
- cd app-2025-11-25-03-11-48
- pnpm run android
- pnpm run ios
- pnpm run web
----------------------------------------
Expo app created successfully!
----------------------------------------
Changing directory to 'app-2025-11-25-03-11-48'
----------------------------------------
Running build command : 'pnpm expo run:android'
----------------------------------------
βΊ Android package name: com.anonymous.app20251125031148
β Created native directory
β Updated package.json
β Finished prebuild
βΊ Opening emulator Pixel_8_Pro
βΊ Building app...
Starting a Gradle Daemon (subsequent builds will be faster)
Configuration on demand is an incubating feature.
> Configure project :
[ExpoRootProject] Using the following versions:
- buildTools: 36.0.0
- minSdk: 24
- compileSdk: 36
- targetSdk: 36
- ndk: 27.1.12297006
- kotlin: 2.1.20
- ksp: 2.1.20-2.0.1
> Configure project :expo
Using expo modules
- expo-constants (18.0.10)
- expo-modules-core (3.0.26)
- [π¦] expo-asset (12.0.10)
- [π¦] expo-file-system (19.0.19)
- [π¦] expo-font (14.0.9)
- [π¦] expo-haptics (15.0.7)
- [π¦] expo-image (3.0.10)
- [π¦] expo-keep-awake (15.0.7)
- [π¦] expo-linking (8.0.9)
- [π¦] expo-splash-screen (31.0.11)
- [π¦] expo-system-ui (6.0.8)
- [π¦] expo-web-browser (15.0.9)
> Task :expo-modules-core:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :app:processDebugMainManifest
/private/tmp/sandbox/app-2025-11-25-03-11-48/android/app/src/debug/AndroidManifest.xml:6:5-162 Warning:
application@android:usesCleartextTraffic was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
/private/tmp/sandbox/app-2025-11-25-03-11-48/android/app/src/debug/AndroidManifest.xml Warning:
provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present
> Task :expo-constants:compileDebugKotlin
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt:12:5 'fun Constants(legacyConstantsProvider: () -> Map<String, Any?>): Unit' is deprecated. Use `Constant` or `Property` instead.
> Task :react-native-reanimated:buildCMakeDebug[arm64-v8a][reanimated] FAILED
C/C++: ninja: error: '/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/react-native-worklets/android/build/intermediates/cmake/debug/obj/arm64-v8a/libworklets.so', needed by '../../../../build/intermediates/cxx/Debug/653d2d6m/obj/arm64-v8a/libreanimated.so', missing and no known rule to make it
> Task :expo:compileDebugKotlin
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt:34:16 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ExpoReactHostFactory.kt:8:8 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ExpoReactHostFactory.kt:80:22 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:24:8 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:58:33 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:105:16 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:105:38 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:113:16 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:114:21 'val reactInstanceManager: ReactInstanceManager' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:168:36 'constructor(activity: Activity, reactNativeHost: ReactNativeHost?, appKey: String?, launchOptions: Bundle?, fabricEnabled: Boolean): ReactDelegate' is deprecated. Deprecated since 0.81.0, use one of the other constructors instead.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:279:77 'val reactInstanceManager: ReactInstanceManager' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:282:22 'val reactInstanceManager: ReactInstanceManager' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt:286:54 'val reactInstanceManager: ReactInstanceManager' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt:6:8 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt:15:9 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt:47:60 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt:7:8 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt:16:23 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt:89:16 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt:101:38 'class ReactNativeHost : Any' is deprecated. Deprecated in Java.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/fetch/ExpoFetchModule.kt:30:39 'constructor(reactContext: ReactContext): ForwardingCookieHandler' is deprecated. Use the default constructor.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/fetch/NativeResponse.kt:42:16 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
w: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/expo/android/src/main/java/expo/modules/fetch/NativeResponse.kt:44:11 'fun deallocate(): Unit' is deprecated. Use sharedObjectDidRelease() instead.
[Incubating] Problems report is available at: file:///private/tmp/sandbox/app-2025-11-25-03-11-48/android/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-reanimated:buildCMakeDebug[arm64-v8a][reanimated]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/react-native-reanimated/android/.cxx/Debug/653d2d6m/arm64-v8a'
[0/2] Re-checking globbed directories...
C++ build system [build] failed while executing:
/Users/beeman/Library/Android/sdk/cmake/3.22.1/bin/ninja \
-C \
/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/react-native-reanimated/android/.cxx/Debug/653d2d6m/arm64-v8a \
reanimated
from /private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/react-native-reanimated/android
ninja: error: '/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/react-native-worklets/android/build/intermediates/cmake/debug/obj/arm64-v8a/libworklets.so', needed by '../../../../build/intermediates/cxx/Debug/653d2d6m/obj/arm64-v8a/libreanimated.so', missing and no known rule to make it
* 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.
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.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 25s
243 actionable tasks: 143 executed, 100 from cache
Error: /private/tmp/sandbox/app-2025-11-25-03-11-48/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a exited with non-zero code: 1
Error: /private/tmp/sandbox/app-2025-11-25-03-11-48/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a exited with non-zero code: 1
at ChildProcess.completionListener (/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/@expo/spawn-async/src/spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:622:26)
at ChildProcess.emit (node:events:507:28)
at maybeClose (node:internal/child_process:1101:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
...
at spawnAsync (/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/@expo/spawn-async/src/spawnAsync.ts:28:21)
at spawnGradleAsync (/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/@expo/cli/src/start/platforms/android/gradle.ts:134:28)
at assembleAsync (/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/@expo/cli/src/start/platforms/android/gradle.ts:83:16)
at runAndroidAsync (/private/tmp/sandbox/app-2025-11-25-03-11-48/node_modules/@expo/cli/src/run/android/runAndroidAsync.ts:62:24)
You're trying to build app in /tmp (linked to /private/tmp on macOS). See https://github.com/expo/expo/issues/40525.
Hey! π
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?