Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :app:configureCMakeDebug[arm64-v8a] FAILED #37124

Closed
avioXD opened this issue Apr 27, 2023 · 9 comments
Closed

Task :app:configureCMakeDebug[arm64-v8a] FAILED #37124

avioXD opened this issue Apr 27, 2023 · 9 comments
Labels
Resolution: Answered When the issue is resolved with a simple answer

Comments

@avioXD
Copy link

avioXD commented Apr 27, 2023

Description

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/.cxx/Debug/p6z2k1x3/arm64-v8a/CMakeFiles/CMakeOutput.log".

  C++ build system [configure] failed while executing:
      @echo off
      "C:\\Users\\abhis\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\cmake.exe" ^
        "-HD:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\node_modules\\react-native\\ReactAndroid\\cmake-utils\\default-app-setup" ^
        "-DCMAKE_SYSTEM_NAME=Android" ^
        "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
        "-DCMAKE_SYSTEM_VERSION=21" ^
        "-DANDROID_PLATFORM=android-21" ^
        "-DANDROID_ABI=arm64-v8a" ^
        "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
        "-DANDROID_NDK=C:\\Users\\abhis\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653" ^
        "-DCMAKE_ANDROID_NDK=C:\\Users\\abhis\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653" ^
        "-DCMAKE_TOOLCHAIN_FILE=C:\\Users\\abhis\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653\\build\\cmake\\android.toolchain.cmake" ^
        "-DCMAKE_MAKE_PROGRAM=C:\\Users\\abhis\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1\\bin\\ninja.exe" ^
        "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\android\\app\\build\\intermediates\\cxx\\Debug\\p6z2k1x3\\obj\\arm64-v8a" ^
        "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\android\\app\\build\\intermediates\\cxx\\Debug\\p6z2k1x3\\obj\\arm64-v8a" ^
        "-DCMAKE_BUILD_TYPE=Debug" ^
        "-DCMAKE_FIND_ROOT_PATH=D:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\android\\app\\.cxx\\Debug\\p6z2k1x3\\prefab\\arm64-v8a\\prefab" ^   
        "-BD:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\android\\app\\.cxx\\Debug\\p6z2k1x3\\arm64-v8a" ^
        -GNinja ^
        "-DPROJECT_BUILD_DIR=D:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\android\\app\\build" ^
        "-DREACT_ANDROID_DIR=D:\\DATASPACE\\Dataspace Academy Mobile APP\\NEW-RELASE\\DataspaceAcademy\\node_modules\\react-native\\ReactAndroid" ^
        "-DANDROID_STL=c++_shared"
    from D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\android\app
  CMake Warning at C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
    C:/Users/abhis/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
    CMakeLists.txt:28 (project)


  CMake Warning at C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/.cxx/Debug/p6z2k1x3/arm64-v8a/CMakeFiles/3.18.1-g262b901-dirty/CMakeSystem.cmake:6 (include)
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/.cxx/Debug/p6z2k1x3/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)


  CMake Warning at C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android-legacy.toolchain.cmake:418 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    C:/Users/abhis/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake:54 (include)
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/.cxx/Debug/p6z2k1x3/arm64-v8a/CMakeFiles/3.18.1-g262b901-dirty/CMakeSystem.cmake:6 (include)
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/.cxx/Debug/p6z2k1x3/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)


  CMake Error at D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)       
    CMakeLists.txt:31 (include)


  CMake Error at D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)       
    CMakeLists.txt:31 (include)


  CMake Error at D:/DATASPACE/Dataspace Academy Mobile APP/NEW-RELASE/DataspaceAcademy/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:109 (target_link_libraries):
    Cannot specify link libraries for target "react_codegen_RNCViewPager" which
    is not built by this project.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 42s
324 actionable tasks: 319 executed, 5 up-to-date`

React Native Version

0.71.4

Output of npx react-native info

``
System:
OS: Windows 10 10.0.22621
CPU: (12) ia32 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 3.20 GB / 15.87 GB
Binaries:
Node: 18.15.0 - C:\Program Files (x86)\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.5.0 - C:\Program Files (x86)\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-221.6008.13.2211.9514443
Visual Studio: Not Found
Languages:
Java: 11.0.17
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found


### Steps to reproduce

**app/build.gradle**

apply plugin: "com.android.application"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

/**

  • This is the configuration block to customize your React Native Android app.

  • By default you don't need to apply any configuration, just uncomment the lines you need.
    /
    react {
    /
    Folders */
    // The root of your project, i.e. where "package.json" lives. Default is '..'
    // root = file("../")
    // The folder where the react-native NPM package is. Default is ../node_modules/react-native
    // reactNativeDir = file("../node_modules/react-native")
    // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
    // codegenDir = file("../node_modules/react-native-codegen")
    // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
    // cliFile = file("../node_modules/react-native/cli.js")

    /* Variants */
    // The list of variants to that are debuggable. For those we're going to
    // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
    // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
    // debuggableVariants = ["liteDebug", "prodDebug"]

    /* Bundling */
    // A list containing the node command and its flags. Default is just 'node'.
    // nodeExecutableAndArgs = ["node"]
    //
    // The command to run when bundling. By default is 'bundle'
    // bundleCommand = "ram-bundle"
    //
    // The path to the CLI configuration file. Default is empty.
    // bundleConfig = file(../rn-cli.config.js)
    //
    // The name of the generated asset file containing your JS bundle
    // bundleAssetName = "MyApplication.android.bundle"
    //
    // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
    // entryFile = file("../js/MyApplication.android.js")
    //
    // A list of extra flags to pass to the 'bundle' commands.
    // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
    // extraPackagerArgs = []

    /* Hermes Commands */
    // The hermes compiler command to run. By default it is 'hermesc'
    // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
    //
    // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
    // hermesFlags = ["-O", "-output-source-map"]
    }

/**

  • Set this to true to create four separate APKs instead of one,
  • one for each native architecture. This is useful if you don't
  • use App Bundles (https://developer.android.com/guide/app-bundle/)
  • and want to have separate APKs to upload to the Play Store.
    */
    def enableSeparateBuildPerCPUArchitecture = false

/**

  • Set this to true to Run Proguard on Release builds to minify the Java bytecode.
    */
    def enableProguardInReleaseBuilds = false

/**

  • The preferred build flavor of JavaScriptCore (JSC)
  • For example, to use the international variant, you can use:
  • def jscFlavor = 'org.webkit:android-jsc-intl:+'
  • The international variant includes ICU i18n library and necessary data
  • allowing to use e.g. Date.toLocaleString and String.localeCompare that
  • give correct results when using with locales other than en-US. Note that
  • this variant is about 6MiB larger per architecture than default.
    */
    def jscFlavor = 'org.webkit:android-jsc:+'

/**

  • Private function to get the list of Native Architectures you want to build.
  • This reads the value from reactNativeArchitectures in your gradle.properties
  • file and works together with the --active-arch-only flag of react-native run-android.
    */
    def reactNativeArchitectures() {
    def value = project.getProperties().get("reactNativeArchitectures")
    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
    }

android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
namespace "com.dataspaceacademy"
defaultConfig {
applicationId "com.dataspaceacademy"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
}

splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include (*reactNativeArchitectures())
    }
}
signingConfigs {
    debug {
        storeFile file('debug.keystore')
        storePassword 'android'
        keyAlias 'androiddebugkey'
        keyPassword 'android'
    }
}
buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        // Caution! In production, you need to generate your own keystore file.
        // see https://reactnative.dev/docs/signed-apk-android.
        signingConfig signingConfigs.debug
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    }
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
    variant.outputs.each { output ->
        // For each separate APK per architecture, set a unique version code as described here:
        // https://developer.android.com/studio/build/configure-apk-splits.html
        // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
        def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
        def abi = output.getFilter(OutputFile.ABI)
        if (abi != null) {  // null for the universal-debug, universal-release variants
            output.versionCodeOverride =
                    defaultConfig.versionCode * 1000 + versionCodes.get(abi)
        }

    }
}

}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation 'com.android.support:multidex:2.0.1'
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
implementation platform('com.google.firebase:firebase-bom:31.5.0')
implementation 'com.google.firebase:firebase-analytics'
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
    implementation("com.facebook.react:hermes-android")
} else {
    implementation jscFlavor
}

}
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' , 'FontAwesome.ttf' ,"MaterialCommunityIcons",
"Ionicons.ttf",
"Feather.ttf",
"FontAwesome5.ttf",
"AntDesign.ttf",
"Entypo.ttf",
"SimpleLineIcons.ttf",
"Octicons.ttf",
"Foundation.ttf",
] // Name of the font files you want to copy
]
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"




### Snack, code example, screenshot, or link to a repository

I tried to implement firebase push notification into my project then this problem occurred.
@github-actions
Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@avioXD
Copy link
Author

avioXD commented Apr 27, 2023

Task :app:compileDebugJavaWithJavac FAILED
D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:37: error: package com.swmansion.reanimated does not exist
import com.swmansion.reanimated.ReanimatedPackage;
^
D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:108: error: cannot find symbol
new ReanimatedPackage(),
^
symbol: class ReanimatedPackage
location: class PackageList
2 errors
w: Detected multiple Kotlin daemon sessions at build\kotlin\sessions

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • 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.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    java.lang.StackOverflowError (no error message)

  • 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.
==============================================================================

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

Now getting this error

@cortinico
Copy link
Contributor

Have you turned on the New Architecture @avioXD ?

@avioXD
Copy link
Author

avioXD commented Apr 27, 2023

I am so new to it. I guess no. Can you help me?

@avioXD
Copy link
Author

avioXD commented Apr 27, 2023

package com.dataspaceacademy;

import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;

public class MainActivity extends ReactActivity {
  @Override
  protected String getMainComponentName() {
    return "YourAppName";
  }

  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName(),
        DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
        // If you opted-in for the New Architecture, we enable Concurrent React (i.e.
        // React 18).
        DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
    ) {
      @Override
      protected ReactNativeHost getReactNativeHost() {
        return new ReactNativeHost(MainActivity.this) {
          @Override
          protected boolean getUseDeveloperSupport() {
            return BuildConfig.DEBUG;
          }

          @Override
          protected List<ReactPackage> getPackages() {
            List<ReactPackage> packages = new PackageList(this).getPackages();
            packages.add(new ReanimatedJSIModulePackage()); // Add this line
            return packages;
          }
        };
      }
    };
  }
}

@cortinico
Copy link
Contributor

I am so new to it. I guess no. Can you help me?

I believe you did. The New Architecture is experimental at the moment.
You can turn it off on Android by changing the:

-newArchEnabled=true
+newArchEnabled=false

in your android/app/gradle.properties file.

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 Newer Patch Available labels Apr 27, 2023
@MaryamShakir
Copy link

I am encountering this error . actually I clone a project and after cloning when I run the project I encounter this error . I tried to rsolve it by using many ways but fail .
Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.

[CXX1429] error when building with cmake using E:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- The C
compiler identification is Clang 12.0.8
-- The CXX compiler identification is Clang 12.0.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -
skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "E:/mana_app/android/app/.cxx/Debug/3s3m254i/arm64-v8a/CMakeFiles/CMakeOutput.log".

C++ build system [configure] failed while executing:
@echo off
"C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\cmake.exe" ^
"-HE:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup" ^
"-DCMAKE_SYSTEM_NAME=Android" ^
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
"-DCMAKE_SYSTEM_VERSION=21" ^
"-DANDROID_PLATFORM=android-21" ^
"-DANDROID_ABI=arm64-v8a" ^
"-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
"-DANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^
"-DCMAKE_ANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^
"-DCMAKE_TOOLCHAIN_FILE=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake" ^
"-DCMAKE_MAKE_PROGRAM=C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^
"-DCMAKE_BUILD_TYPE=Debug" ^
"-DCMAKE_FIND_ROOT_PATH=E:\mana_app\android\app\.cxx\Debug\3s3m254i\prefab\arm64-v8a\prefab" ^
"-BE:\mana_app\android\app\.cxx\Debug\3s3m254i\arm64-v8a" ^
-GNinja ^
"-DPROJECT_BUILD_DIR=E:\mana_app\android\app\build" ^
"-DREACT_ANDROID_DIR=E:\mana_app\node_modules\react-native\ReactAndroid" ^
"-DANDROID_STL=c++_shared" ^
"-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON"
from E:\mana_app\android\app
CMake Error at E:/mana_app/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
add_subdirectory given source
"E:/mana_app/node_modules/@react-native-clipboard/clipboard/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
E:/mana_app/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)

CMake Error at E:/mana_app/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:124 (target_link_libraries):
Cannot specify link libraries for target "react_codegen_RNCClipboard" which
is not built by this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (include)

  • 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.

BUILD FAILED in 53s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'. > [CXX1429] error when building with cmake using E:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- The C compiler identification is Clang 12.0.8 -- The CXX compiler identification is Clang 12.0.8 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C
compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring incomplete, errors occurred! See also "E:/mana_app/android/app/.cxx/Debug/3s3m254i/arm64-v8a/CMakeFiles/CMakeOutput.log". C++ build system [configure] failed while executing: @echo off "C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\cmake.exe" ^ "-HE:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup" ^ "-DCMAKE_SYSTEM_NAME=Android" ^ "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^ "-DCMAKE_SYSTEM_VERSION=21" ^ "-DANDROID_PLATFORM=android-21" ^ "-DANDROID_ABI=arm64-v8a" ^ "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^ "-DANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_ANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_TOOLCHAIN_FILE=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake" ^ "-DCMAKE_MAKE_PROGRAM=C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_BUILD_TYPE=Debug" ^ "-DCMAKE_FIND_ROOT_PATH=E:\mana_app\android\app\.cxx\Debug\3s3m254i\prefab\arm64-v8a\prefab" ^ "-BE:\mana_app\android\app\.cxx\Debug\3s3m254i\arm64-v8a" ^ -GNinja ^ "-DPROJECT_BUILD_DIR=E:\mana_app\android\app\build" ^ "-DREACT_ANDROID_DIR=E:\mana_app\node_modules\react-native\ReactAndroid" ^ "-DANDROID_STL=c++_shared" ^ "-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON" from E:\mana_app\

Any One please help me how to resolve this.

@GNUGradyn
Copy link

Why was this closed? Issue still exists when new arc is enabled

@MartinGambit
Copy link

Yea i am facing the same issue when newArchitecture is enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

5 participants