In my ~/project/.idea/modules.xml
file the 8th line is always repeated. If I delete it, the line is put back whenever I save (auto-save).
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/GoogleMapsForWork/GoogleMapsForWork.iml" filepath="$PROJECT_DIR$/GoogleMapsForWork/GoogleMapsForWork.iml" />
<module fileurl="file://$PROJECT_DIR$/SAMRecipeApplication/SAMRecipeApplication.iml" filepath="$PROJECT_DIR$/SAMRecipeApplication/SAMRecipeApplication.iml" />
<module fileurl="file://$PROJECT_DIR$/SAMStore/SAMStore.iml" filepath="$PROJECT_DIR$/SAMStore/SAMStore.iml" />
<module fileurl="file://$PROJECT_DIR$/SillyAppStore.iml" filepath="$PROJECT_DIR$/SillyAppStore.iml" />
<module fileurl="file://$PROJECT_DIR$/SillyAppStore.iml" filepath="$PROJECT_DIR$/SillyAppStore.iml" />
<module fileurl="file://$PROJECT_DIR$/SillyAppStore/SillyAppStore-SillyAppStore.iml" filepath="$PROJECT_DIR$/SillyAppStore/SillyAppStore-SillyAppStore.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/apptentive/apptentive.iml" filepath="$PROJECT_DIR$/apptentive/apptentive.iml" />
<module fileurl="file://$PROJECT_DIR$/volley/volley.iml" filepath="$PROJECT_DIR$/volley/volley.iml" />
</modules>
</component>
</project>
I understand that there's some setting somewhere that insists on doubling this line (or it's created in two places), but I don't understand the intracies of the IDE well enough to track this error down. None of my co-workers have this problem; it's stumping everyone here.
This issue has been puzzling, but hasn't prevented me from working. It does cause problems with version control as this file is ALWAYS flagged as modified (prevents me from simply typing git add -A
).
Any suggestions, other than wiping the project and starting fresh?
It's often happens when you first time open the project, and the solution is quite simple and easy. Just delete the original line and the duplicate line, then wait few minutes for Android Studio generate it again, after re-generate, it will never duplicate later.
For your situation, delete these two repeated lines, then wait few minutes for generate again.