10

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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Bad Loser
  • 3,065
  • 1
  • 19
  • 31
  • Another related post - [Missing top-level build.gradle in multi-module project](https://stackoverflow.com/q/31505263/465053) – RBT Aug 13 '18 at 08:12

3 Answers3

19

For me this worked fine.

      1. Close the project  using Close project option.
      2. Import the project newly from android studio.
Thriveni
  • 742
  • 9
  • 11
12

You can delete .gradle and .idea folders in your project manually and reload your project, it helped me.

Acuna
  • 1,741
  • 17
  • 20
5

I eventually circumvented this bug by simply renaming the project folder!

Re-creating the problem has proved impossible, but I strongly suspect a synchronisation problem in an obscure little file called project.dat.

Please refer to the answer I gave to the aforementioned question here!

Bad Loser
  • 3,065
  • 1
  • 19
  • 31