Search code examples
androidandroid-studiogradlepathsetting

My gradle can't build any new project


Someday I went to file > Settings > Build, Execution,Deployment > Build Tools > Gradle and I Checked Use gradle wrapper (recommended). Then I changes it back to the Use local gradle distribution with "C:/Program Files/Android/Android Studio/gradle/gradle-2.2.1" Gradle home value. But now Just I can build and open my last project when I checked Gradle and I Checked Use gradle wrapper (recommended). But any new project is not resolved and can't build it. enter image description here


Solution

  • I found that It's a bug I think. But I should first disconnect to the internet and wait for the project be build.Then Go to file > Settings > Build, Execution,Deployment > Build Tools > Gradle and choose local gradle. Then I type the path( C:/Program Files/Android/Android Studio/gradle/gradle-2.2.1 ) and click ok. At the last part I can connect to the internet after all.