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
Could not compile settings file 'F:\myRNproject\android\settings.gradle'. #8570
Comments
The error message is pretty clear. Please check your |
rootProject.name = 'myRNproject' include ':app' |
You need to escape |
I get it. '' should be replaced by '/' .Thank you very much. |
I already have "/" . in settings.gradle file. i am still facing that error |
Same error as @barmola . All the / slashes are their but still no luck |
Actually my error got resolved after following steps: for me error occurred after installing multiple packages in one npm install l was trying to install react navigation , react-native-gesture-handler,react-native-screen , so i tried to install them one by one, and after installing every package i opened my [project_name]\android folder in Android Studio and rebuild my project after every install and opened cmd inside android folder and ran this command ./gradlew clean after doing this my BUILD was SUCCESSFULL!!!!! This may be confusing but this worked out for me |
the error which you are getting the same error i was also getting, JDK 13 is not supported by Gradle 6.[above] try to install JDK 8. and then go through the above mentioned steps. |
Yeah I did that recently and it worked for me too. What didnt work for me was: Fix: |
I also tried 2 and 3 didn't worked for me too. |
|
Everyone, I'm 100% sure that's syntax error in your build script and you need to paste your code here to get help, at least the lines which is reported error by compiler. We can't help you if you only say "same error". |
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 |
Same error as @barmola . All the / slashes are their but still no luck**** |
Hello, |
Hi @toplongguodev, try running the following commands in this order: I got the same problem when a cloned a project and turns out the problem was the different versions the other user was using. |
Hello, This is my settings.gradle file apply from: '../capacitor.settings.gradle' and I'm getting this error when I build the code Can anyone help me out with this? |
The issue still occurs. Windows 10 |
gradlew clean worked for me. |
Anyone???? |
This is an issue with how Gradle is automating the build and the current version of the JDK installed on your machine, follow these steps to fix it, the react native documentation states you need adoptopenjdk8, however you may have other conflicting JDK versions in the same directory. Step one: open up your terminal and navigate to /Library/Java/JavaVirtualMachines by typing the following command:
after you have done that type incase you have one or multiple JDK files present like such:
then go head and delete them with the following command line :
the only dependency you need is adoptopenjdk-8.jdk as mentioned in the react native docs however delete that aswell and reinstall it after you have completed these steps:
after you have done so you can check if the files still exist by typing if the files are deleted. Step 2: then run the following commands to insure all other links, plugins and files are deleted as-well from your Library: run the following :
Step 3: once you have done the following, reinstall the correct jdk as mentioned in the react native docs like so:
https://reactnative.dev/docs/_getting-started-macos-android this may say adoptopenjdk-8.jdk is already installed, but go ahead and reinstall install it with:
At this point the error should be resolved and your build should work. It is important to note that this is a build error, since react native uses Gradle to build automations, the conflicting of multiple jdk versions can cause your build to fail. please refer to the following documentation: |
cd /Library/Java/JavaVirtualMachines The system cannot find the path specified in windows |
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'.
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 6s
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)
The text was updated successfully, but these errors were encountered: