react-native: :app:recordFilesBeforeBundleCommandDebug FAILED
I get the following error message when running ‘react-native run-android’, and cannot get more detailed information even with --stacktrace, --info or --debug options.
:app:recordFilesBeforeBundleCommandDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:recordFilesBeforeBundleCommandDebug'.
> A problem occurred starting process 'command 'node''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.042 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 21
- Comments: 40 (15 by maintainers)
I’ve seen this too - similar to @anderson916 in that it’s by no means 100% failing. My workaround is to run ./gradlew --stop (which stops the daemon)
By changing node executable path in build.gradle(app) works for me.
Still experiencing this issue right now, even after running ./gradlew --stop as suggested multiple times.
My project is native with react native. My Environment : android studio : 3.0 beta gradle plugin : 3.0.0-beta7 gradle wrapper: gradle-4.1-all.zip Any ideas?
2017-10-27, I updated my android studio to 3.0 stable version , but still experiencing this issue.
Execution failed for task ‘:app:recordFilesBeforeBundleCommandOfficialDebug’.
I got the same error with buildTools to 26.0.2 and Android Studio 3.0.0 on Mac @mkonicek could we reopen the issue?
./gradlew --stop or simply you can close your Android Studio
@cskaynar’s solution is the correct one. Downgrading from 26 to 25 is a bandaid.
You can also specify your node executable at your root
build.gradle
so that it applies to all sub projects, which makes sense:To find out where your node executable is located, run
which node
from the terminal and replace/usr/local/bin/node
with whatever the result is.@gtzh110 Did you ever resolve your issue? Running into the same issue myself and none of the other suggestions are working.
UPDATE: I reverted back to buildToolsVersion 25.0.0 and this error went away. It appears that in upgrading to Android Studio 3.0.0 and taking the suggestion to update buildTools to 26.0.2 seems to have caused the error.
I got the same error with buildTools to 26.0.2 and Android Studio 3.0.0 on Mac
I got the same error with buildTools to 26.0.2 and Android Studio 3.0.0 on Mac
Just create a symbolic link like so:
Step 1:
which node
In my case that printed out
/usr/local/opt/nvm/versions/node/v8.4.0/bin/node
Step 2: Then I did
ln -s /usr/local/opt/nvm/versions/node/v8.4.0/bin/node /usr/local/bin/node
and it now works.
@joshuapinter That version worked for me, thanks!
@artdent did u already fix the problem ? i got the same issue too ,and i dont know how to fix it
Stop daemon helps when gradle daemon not started from terminal. E.g. Android Studio launches with custom env variables.
Is this related to NVM perhaps? I’m definitely using NVM, and I’ve seen this issue as well.