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
@react-native-community/cli-platform-android Build failed with an exception #838
Comments
It seems like you have global |
@Esemesek since we call
seems more appropriate. |
I haven't install |
Can you please run I would recommend upgrading to "just released" version 3.0.0 and pasting the output again. The line should be different and we can debug this further. |
I create the project use command yarn react-native config
yarn android
|
Have you seen the error message?
|
I did not install When remove the native_modules.gradle comment
to
it's ok. |
I am seeing this after upgrading to 0.61.4 react-native. I've never installed react-native or react-native-cli globally. Commenting back in the 2nd argument here didn't change it for me |
Looks like the JSON is invalid and |
I've solved like this on - def command = "${npx} --quiet --no-install react-native config"
+ def command = "yarn --silent react-native config"
` `` |
Try updating the Node to the version 10.17.0. It helped me. |
another problem with |
Any fix for this?
|
I found a workaround for this:
|
Worked fine
can be found in
if you use yarn check @sibelius answer up here You will need to clear gradle cache also |
This fixed the issue for me |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Same issue here on CI. Locally it works. Perhaps it's because it is using npx and we use yarn? |
We use npx because it should be universally available along with Node.js. Using yarn to install deps shouldn't matter, but we've seen some reports of |
It stopped working when upgrading react-native from |
It's definitely the npx command that not behaving well. The old version of |
For other people that are affected, this in your package.json will fix it for you:
|
Uncommenting
|
I believe there are several duplicate issues here:
They appear to be a result of this change: #852 |
Do you also have a monorepo where the app resides in a subfolder when compiling on app center? |
None of the answers works, I run here is my result of
|
check if your running |
it's for a few days ago, so I can't remember exactly, but usually I start one react-native instance (using |
Pretty much what worked for me. I wasn't running |
Surprisingly, a lot of issues here were resolved by doing something totally irrelevant to the CLI. I believe the title of this issue is misleading because many builds can "fail with an exception". This is the standard Android failure that can happen on many occasions. I am going to close this issue and encourage you to open other issues in the future with more verbose title/description to not confuse anyone. Also, |
same issue still persists but i found a work around : after it finishes run your app the normal way |
I was seeing the same issue. I did the following to fix it:
running |
Okay for me it was something different. I was using nvm with lower node(7.4.0) as a default version. I thought I specified nvm to use latest for this Project folder, but it did not work. After setting latest node as global default in nvm it fixed the issue. Also, funny thing is project was running fine with run-android but would not sync in Android Studio. |
Simply , below code solved for me :
|
@trrfrr Sorry for late,
When I run unlike to @b1ngx's log file, I have an error in line 200. I check the line in
@iamadityaaz Also, I have previously uninstalled the global |
I think I found what is wrong with my project, I'm using gradle wrapper version So upgrading to an upper version like is it possible to somehow check the Gradle wrapper version in the |
This is a good idea. I would recommend sending a PR to the CLI that adds "Troubleshooting" section to the main readme. |
@SaeedZhiany |
I'm using RN v0.61.5
RN website says it's needed;
|
I was getting this issue and nothing seemed to fix it. Until i noticed that i was using a gradle version higher than what the guide had suggested. Go to
And ensure your Edit: Also, there seemed to be some issue with with node that it would not install the correct packages, check your node_modules directory to check if the package was installed correctly or not (file with the script exists or not). I used yarn instead and it installed things correctly. |
THAT'S WORKING THANKS!!!! |
I just deleted the build folder that's inside the android/app, i don't know what is the cause for this issue so my solution obviously may not work, but i will just leave it here in case someone has the same issue as me |
This worked for me, thank you. |
I'm working in a monorepo. The file exists, but it was in my project root's To fix this, I updated the paths
|
must gradel 6.2.all . it is work for me |
I'm too working in a monorepo. I just add line to "nohoist": [
+ "**/@react-native-community/**",
"**react-native**",
...
] |
I deleted the build folder inside the path \android\app and rebuilt the project |
This comment has been minimized.
This comment has been minimized.
hai guys I got the same error. please help me FAILURE: Build failed with an exception.
BUILD FAILED in 5s error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. |
I've had
Solved with
|
Hello . please, I have an error for a yawn and I don't know how to solve. I really need help!
|
Hello communityI'm facing an error in
React-native Info
React-native Version I tried to reinstall the package but nothing change |
open that android studio with command line |
Environment
react-native info
react-native --version
Description
yarn android
Reproducible Demo
The text was updated successfully, but these errors were encountered: