I'm creating an Android project with Gradle Android Module, but as soon as I create it, I have an error I don't understand and I have no idea to resolve it. It says
Gradle project sync failed. Basic functionality (e.g editing, debugging) will not work properly" or "Gradle 'myapp' project refresh failed: A fatal exception has occurred. Program will exit. : Gradle settings
If you have an idea of what causes this problem or if you have already encountered it, please tell me what to do.
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
If you have some custom plugins that require you to import your project from the IntelliJ IDEA model, press Ctrl+Shift+A and search for the Project from Existing Sources action. In the dialog that opens, select a directory containing a Gradle project and click OK. IntelliJ IDEA opens and syncs the project in the IDE.
Came across this issue when I was having similar issue. I solved this problem as follows
Download and extract gradle file to directory of choice
Set the environmental variable for gradle, I think this has no effect in the solution.
Go to intellij and access setting window through File -> Setting
On setting window, go to Build, Execute. Deployment -> Build Tools -> Gradle
Check "Use local gradle distribution"
From Gradle home field access gradle installed path
Please note, I am working with intellij 15.
I have run into the same problem. Part of it may be that you have recently installed the Android SDK and have not accepted the license agreement. Here are the steps you can take. (I was using IntelliJ Ultimate IDEA 14.0.2.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With