I was following a youtube tutorial on changing my android studio project name, so that when I download it from Google Play it doesn't display the old app name. The video suggested Refactor--> Renaming the .IML file, and then going to Modules.xml and changing the values there. Now my project won't build and all my classes have a red "J" on them and they're all grayed out. Please help!!!
Asked
Active
Viewed 886 times
0
-
Delete the iml files and the .idea folder, then rebuild the project with gradle – Gabriele Mariotti Oct 05 '15 at 20:58
-
IML files? Or File? I deleted the .IML file and the .idea folder, rebuilt with gradle and I still have the same problem. I've been working on this project for months, this is a disaster... – Professor_Membrane Oct 05 '15 at 21:16
-
if you have renamed the folder, check also the settings.gradle file. It should contain the renamed folder. – Gabriele Mariotti Oct 05 '15 at 21:23
-
There is nothing in the settings.gradle file, nothing at all – Professor_Membrane Oct 05 '15 at 21:25
-
Check the updated answer. – Gabriele Mariotti Oct 05 '15 at 21:31
1 Answers
1
You should have a structure like this:
root
.idea //remove it
mymodule
mymodule.iml //remove it
build.gradle
src
project.iml //remove it
build.gradle
settings.gradle
Follow these steps:
- Remove the iml file in each module
- Remove the .idea folder
Open the settings.gradle
file and check if it is somenthing like:
include ':mymodule'
where mymodule is the name of the folder which contains the module (build.gradle
and code)
- resync and rebuild the project

Gabriele Mariotti
- 320,139
- 94
- 887
- 841
-
Each module meaning the module.xml file? Could you specify where I would find "each" module? Not super familiar with the inner workings of the IDE. I tried opening the module.xml file and removing the .IML references listed. Then deleted the .idea folder, then opened up settings.gradle and there was nothing in the file. So I added ':mymodule' to it, then it made a folder that now contains a 'mymodule.iml' but I've still got X's through my entire project... I'm screwed... – Professor_Membrane Oct 05 '15 at 21:48
-
@Professor_Membrane check the updated answer. Of course use your current name for the mymodule. – Gabriele Mariotti Oct 05 '15 at 22:16