Skip to content

Execution failed for task ':nodejs-mobile-react-native:buildCMakeDebug[x86]' #88

@1391735963

Description

@1391735963

I had this problem, and i use ReactNative 0.76.1,nodejs-mobile-react-native 18.20.4,jdk 21
This is the method I tried

  1. follow the document
  2. read issues https://github.com/nodejs-mobile/nodejs-mobile-react-native/issues/34
  3. read that issues refer code,but the new version include that developers fixed code
  4. clear gradle cache
  5. clear npm cache

next is error message, please help me , i fix this problem 2 weeks ,but have no clue

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':nodejs-mobile-react-native:buildCMakeDebug[x86]'.

com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\wnt-app\node_modules\nodejs-mobile-react-native\android.cxx\Debug\4i3k5t2i\x86'

C++ build system [build] failed while executing:
@echo off
"C:\Users\Lingwl\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^
-C ^
"C:\wnt-app\node_modules\nodejs-mobile-react-native\android\.cxx\Debug\4i3k5t2i\x86" ^
nodejs-mobile-react-native-native-lib
from C:\wnt-app\node_modules\nodejs-mobile-react-native\android
ninja: error: '../../../../libnode/bin/x86/libnode.so', needed by '../../../../build/intermediates/cxx/Debug/4i3k5t2i/obj/x86/libnodejs-mobile-react-native-native-lib.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.

BUILD FAILED in 8s

this is my android dictory build.gradle configure
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}

apply plugin: "com.facebook.react.rootproject"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions