intellij idea – Duplicate files in Android Studio project view-ThrowExceptions

Exception or error:

I have a strange issue where project specific root level files (.gitignore, gradlew,, etc) show up twice in Android Studio’s project view. Does anybody know how to fix this?

I’ve tried re-importing the project (after deleting the .iml and .idea file/folder).

enter image description here

How to solve:

I found exactly the same problem recently when I created a new Gradle project and imported into IntelliJ. However, the root cause seems to be the use of symbolic links when importing the project.

I have the following symbolic link:

/data -> /Users/<user>/data

When I originally imported my project, I imported /data/checkouts/<project_dir> but found that I had duplicate files from the top level directory exactly like as shown above.

However, I removed the project and attempted to import it again, this time using the full path of /Users/<user>/data/checkouts/<project_dir> and found that I no longer see the duplicates.

I haven’t seen this problem before when importing an eclipse or Maven project, so can only imagine that it might be related to the use of the Gradle plugin for IntelliJ.

Leave a Reply

Your email address will not be published. Required fields are marked *