facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.82k stars 24.16k forks source link

BuildCmakeDebug Issue #38764

Closed PenguinTaro closed 1 year ago

PenguinTaro commented 1 year ago

Description

I have been working on Aries Bifold app which uses the react-native, I encounter an error while to do "yarn run android" to run my application . It gives the error for BuildCmakeDebug error. I am bit surprised because using the same configuration it's working in my personal laptop but if I try the same in my office laptop it's giving me error. So please help me out finding the point of issue. Thank you so much.

React Native Version

0.66.5

Output of npx react-native info

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
    Memory: 5.69 GB / 15.69 GB
  Binaries:
    Node: 16.15.0 - D:\nvm-noinstall\v16.15.0\node.EXE
    Yarn: 3.3.1 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.5.5 - D:\nvm-noinstall\v16.15.0\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: AI-213.7172.25.2113.9123335
    Visual Studio: Not Found
  Languages:
    Java: 11.0.10
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Install dependency using "yarn install"
  2. I run the "yarn run prepare" to build the dependency files
  3. "yarn start" to run the metro
  4. "yarn run android" to start my application build

Snack, screenshot, or link to a repository

Task :hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a] FAILED
Caching disabled for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]' because:
  Build cache is disabled
Task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]' is not up-to-date because:
  Task.upToDateWhen is false.
C/C++: starting build
C/C++: reading expected JSONs
C/C++: done reading expected JSONs
C/C++: executing build commands for targets that produce .so files or executables
C/C++: evaluate miniconfig
C/C++: evaluate library anoncredsreactnative (arm64-v8a)
C/C++: building target library anoncredsreactnative because no targets are specified.
C/C++: about to build targets anoncredsreactnative
C/C++: Executable : C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
arguments :
-C
D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a
anoncredsreactnative
jvmArgs :

C/C++: Build anoncredsreactnative_arm64-v8a
C/C++: Executable : C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
arguments :
-C
D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a
anoncredsreactnative
jvmArgs :

Starting process 'command 'C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe''. Working directory: D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android Command: C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe -C D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a anoncredsreactnative
Successfully started process 'command 'C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe''   
C/C++: ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/saroj.basnet/hyperledgerAries/AriesBifold0.4/packages/legacy): No such file or directory
:hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a] (Thread[Execution worker Thread 2,5,main]) completed. Took 1.146 secs.

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
410 actionable tasks: 6 executed, 404 up-to-date
Watched directory hierarchies: [D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\android]

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a anoncredsreactnative}
  ninja: Entering directory `D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a'
  ninja: build stopped: .

  ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/saroj.basnet/hyperledgerAries/AriesBifold0.4/packages/legacy): No such file or directory

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --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 --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 3m 12s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process C:\Users\saroj.basnet\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a anoncredsreactnative}
  ninja: Entering directory `D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\3e3z493y\arm64-v8a'
  ninja: build stopped: .

  ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/saroj.basnet/hyperledgerAries/AriesBifold0.4/packages/legacy): No such file or directory

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --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 --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 3m 12s

    at makeError (D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\execa\index.js:174:9)    
    at D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
npm ERR! Lifecycle script `android` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: aries-bifold-app@0.0.1
npm ERR!   at location: D:\saroj.basnet\hyperledgerAries\AriesBifold0.4\packages\legacy\app
github-actions[bot] commented 1 year ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
github-actions[bot] commented 1 year ago
:warning: Too Old Version of React Native
:information_source: It looks like your issue or the example you provided uses a Too Old Version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
PenguinTaro commented 1 year ago

Why this was closed?

cortinico commented 1 year ago

Because of this https://github.com/facebook/react-native/issues/38764#issuecomment-1663267559