How to solve the issue of Android Studio 3 (3.1 canary) Preview: Cannot import project
This needs two steps:
You must delete the .idea folder under your project. It is a hidden directory. use
ls -a
to find it out.Right click
build.gradle
and choose application. It probably popup a window asking for a program to open it, chooseAndroid Studio
.
I faced the same problem with 3.1 and .idea folder was also not there. Still it was not working. So instead of doing "Import Project" I did "Open an existing Android Studio project" and it worked.
I encounter same problem recently when opening existing Android Project,
deleting .idea
or open directly build.gradle
through Mac OS Finder work for me