Everything works OK until I change my laptop’s timezone from UTC -8:00 to UTC +7:00. After that, “Gradle files have changed since last project sync…” message always shows up.
How can I fix it? Of course I don’t want to change my timezone to UTC -8:00 again.
OK, that’s strange.
Here is what I would do:
Close the project in Android Studio (so you are back at the Welcome dialog), then close Android Studio altogether
Back up the project, so that if the following steps go crazy, I can recover
.idea/directories from the project root, along with the
*.imlfile in the project root
build/directory and the
*.imlfile from each module in the project (e.g.,
Open Android Studio and import the cleaned-up project
This will force a complete regeneration of the
.idea/ directory and
*.iml files, which are the primary “project files” that the Gradle sync operation is supposed to sync.
Or, just wait 24 hours, as the problem may go away on its own.