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

Command failed: gradlew.bat installDebug #5607

Closed
wxy1234567890 opened this issue Feb 20, 2019 · 18 comments
Closed

Command failed: gradlew.bat installDebug #5607

wxy1234567890 opened this issue Feb 20, 2019 · 18 comments

Comments

@wxy1234567890
Copy link

I install 'react-navigation' according to official documents developing Android on the window, however, when I run 'react-native run-android' ,problems as follows:

FAILURE: Build failed with an exception.

  • Where:
    Settings file 'F:\myRNproject\android\settings.gradle' line: 3

  • What went wrong:
    Could not compile settings file 'F:\myRNproject\android\settings.gradle'.

startup failed:
settings file 'F:\myRNproject\android\settings.gradle': 3: unexpected char: '' @ line 3, column 127.
ules\react-native-vector-icons\android')
^

1 error

  • 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 3s
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/getting-started.html

Command failed: gradlew.bat installDebug

Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnAllDevices (F:\myRNproject\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
at buildAndRun (F:\myRNproject\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12)
at isPackagerRunning.then.result (F:\myRNproject\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

@brentvatne
Copy link
Member

unrelated to react-navigation

@aroldoandrade
Copy link

open your 'settings.grandler' file in the android folder

change the '\' to '/'

save the file

run the command 'react-native run-android

Sorry for my English translator.

@Diegolaquino
Copy link

open your 'settings.grandler' file in the android folder

change the '' to '/'

save the file

run the command 'react-native run-android

Sorry for my English translator.

Thank you, aroldoandrade.

@luis-otavio
Copy link

open your 'settings.grandler' file in the android folder

change the '' to '/'

save the file

run the command 'react-native run-android

Sorry for my English translator.

Worked here.

@syedamirali14
Copy link

open your 'settings.grandler' file in the android folder

change the '' to '/'

save the file

run the command 'react-native run-android

Sorry for my English translator.

i didn't get it sorry can you guide me a little?

@PurnimaNaik
Copy link

@aroldoandrade do you mean settings.grandle instead of settings.grandler? I don't have a ' \ ' in my settings.grandle

@BayeuxRemy
Copy link

BayeuxRemy commented Apr 5, 2019

@PurnimaNaik I do not have ' \ ' either in my seettings.gradle. I do not know how to fix this error ..><
I tried all forums' soltuions.. but nothing work

@codebased
Copy link

Please check my solution here: https://stackoverflow.com/questions/54776936/command-failed-gradlew-bat-installdebug/56062411#56062411

@fernandopedro
Copy link

Please check my solution here: https://stackoverflow.com/questions/54776936/command-failed-gradlew-bat-installdebug/56062411#56062411

Perfect. Work for me.

@sivajyothisaladi
Copy link

BUILD FAILED in 5s
26 actionable tasks: 1 executed, 25 up-to-date
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

please answer this error

@asfand10
Copy link

open your 'settings.grandler' file in the android folder

change the '' to '/'

save the file

run the command 'react-native run-android

Sorry for my English translator.

Thanks man!! worked perfectly

@muneebahmed97
Copy link

I don't find just "/" in settings.gradle

@Hasintha-git
Copy link

I don't find just "/" in settings.gradle

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

This one

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

@RonBouch
Copy link

RonBouch commented Nov 20, 2022

Run this command chmod 755 android/gradlew from your root project directory

Worked for me.

@arhamabeer
Copy link

arhamabeer commented Feb 3, 2023

I didn't find a single " \ " in my settings.gradle file, can some one guide me on this?

@Dhika1011
Copy link

Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

@C2418M31
Copy link

I also experience this error.

error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installProdGoogleDebug -PreactNativeDevServerPort=8081

Integrating RN to exisiting app is very very hard and ive been doing testing for 2 weeks and havent even build it once. Need to convert everything to Kotlin DSL. I hope the core devs of RN able to fixed this and the compatibility to the latest android DSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests