question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReactAndroid:buildReactNdkLib FAILED on react-native V0.60.4

See original GitHub issue

Description Instruction for building from source not working: https://facebook.github.io/react-native/docs/building-from-source. The error I got as below: Error

> Task :ReactAndroid:buildReactNdkLib FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
73 actionable tasks: 3 executed, 70 up-to-date
error: unable to open output file 'C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/HermesExecutorFactory.o': 'No such file or directory'
1 error generated.
error: unable to open output file 'C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/JSITracing.o': 'No such file or directory'
1 error generated.
make: *** [C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/HermesExecutorFactory.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/JSITracing.o] Error 1
error: unable to open output file 'C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/OnLoad.o': 'No such file or directory'
1 error generated.
make: *** [C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-executor-debug/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/__/hermes/reactexecutor/OnLoad.o] Error 1
error: unable to open output file 'C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-inspector/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/__/ReactCommon/hermes/inspector/Inspector.o': 'No such file or directory'
1 error generated.
make: *** [C:\SVNcode\APP\RNSixZero\TestReactNativeNavigationCopy\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/hermes-inspector/C_/SVNcode/APP/RNSixZero/TestReactNativeNavigationCopy/node_modules/react-native/ReactAndroid/__/ReactCommon/hermes/inspector/Inspector.o] Error 1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command 'C:\Users\E0508417\Downloads\android-ndk-r17c-windows-x86_64\android-ndk-r17c\ndk-build.cmd'' finished with non-zero exit value 2

* 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 26s

To Reproduce 1.Complete instruction: https://facebook.github.io/react-native/docs/building-from-source 2.react-native run-android

Expected Behavior Everything should work after completing all instruction steps.

React Native version System: OS: Windows _10 CPU: (4) x64 Intel® Core™ i5-6500 CPU @ 3.20GHz Memory: 5.29 GB / 15.79 GB Binaries: Node: 10.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.16.0 - C:\Users\E0508417\AppData\Roaming\npm\yarn.CMD npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.1.0.0 AI-173.4907809 npmPackages: react: “16.8.6” react-native: “0.60.4” android-ndk : android-ndk-r17c

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

8reactions
react-native-botcommented, Aug 30, 2019

I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

2reactions
iamdhjcommented, Jan 21, 2020

In Windows System too long directory path will cause problem No such file or directory Change the build directory path to reduce path length by editing the ~/.gradle/init.gradle file

gradle.projectsLoaded {
    rootProject.allprojects {
        buildDir = "c:/tmp/${rootProject.name}/${project.name}"
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactAndroid:buildReactNdkLib FAILED on react-native V0.60.4
Instruction for building from source not working: https://facebook.github.io/react-native/docs/building-from-source. The error I got as below.
Read more >
React Native agent release notes - New Relic Documentation
React Native agent v0.0.7. Fixed in this release Fixed an issue where error stack trace length would cause crashing in iOS apps. October...
Read more >
Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >
react-native - npm
Changes to JavaScript code can be live reloaded without rebuilding the native app. Portability. Reuse code across iOS, Android, and other ...
Read more >
Versions · React Native
React Native versions. Open source React Native releases follow a release train that is coordinated on GitHub through the react-native-releases repository.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found