In Android Studio 3.0.1 Project window I select Android then expand Gradle Scripts
Normally the top of the list shows build.gradle(Project:XXXX).
It does not appear, but choosing Project window Project Files confirms it's existance.
I have laboriously compared this project's home directory to that of a 'good' project but nothing stood out.
The project was created from a recently forked repo via
File > New > Project from Version Control > GitHub
The project builds correctly, honoring my changes to the project build.gradle.
This question may have been asked elsewhere but remains unanswered, so I am re-asking it with additional information!
Any insights or new avenues to explore would be appreciated.
Update I have removed Versioning for this project and the problem persists. Have removed GitHub tag for this question.
It could be that you are using gradle in offline mode. To uncheck it go to File > Settings > Gradle , uncheck the Offline Work checkbox, and click Apply Make sure you have internet connection and sync the project again.
The top-level build.gradle file, located in the root project directory, defines dependencies that apply to all modules in your project. By default, the top-level build file uses the plugins block to define the Gradle dependencies that are common to all modules in the project.
If you are already using Gradle with your IntelliJ project, you can open it in Android Studio using the following steps: Click File > New > Import Project. Select your IntelliJ project directory, and click OK. Your project will open in Android Studio.
For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.
You can delete .gradle
and .idea
folders in your project manually and reload your project, it helped me.
For me this worked fine.
1. Close the project using Close project option.
2. Import the project newly from android studio.
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