How to solve the issue of Android Studio 3 (3.1 canary) Preview: Cannot import project

This needs two steps:

  1. You must delete the .idea folder under your project. It is a hidden directory. use ls -a to find it out.

  2. Right click build.gradle and choose application. It probably popup a window asking for a program to open it, choose Android 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