Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate files in Android Studio project view

Tags:

I have a strange issue where project specific root level files (.gitignore, gradlew, gradle.properties, 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

like image 850
loeschg Avatar asked Jan 08 '14 17:01

loeschg


People also ask

What is the best duplicate file finder for Android?

One of the best duplicate file finder application from Google, Files by Google. Files app will scan your entire device, not just your gallery, it will also check duplicate files and other clutter junk images which are covering more space in your device.


1 Answers

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.

like image 128
dafunker Avatar answered Sep 22 '22 08:09

dafunker