Obsolete
Status Update
Comments
sb...@google.com <sb...@google.com> #2
For the time being, make changes directly in the Gradle build files.
ec...@gmail.com <ec...@gmail.com> #3
Just to inform that, intended or not, the second problem described in this issue has been solved in 0.2.1. The first one still needs the workaround from comment #1 .
sb...@google.com <sb...@google.com> #4
This will be fixed by https://android-review.googlesource.com/#/c/62991/ though renaming modules reveals other problems now, namely that I see it create a second module in the project structure view, so that you have two -- one with the old name and one with the new name. I think this is happening because when you rename the directory, not the module (which is the change that needs to be reflected in the settings.gradle file), it doesn't actually rename the module itself. But when the Gradle builder sees the changed settings.gradle and re-imports, it creates a second module with the new name.
The real problem here is that IJ supports modules with a name different from their root directory, and Gradle does not. I wonder if we should disable that facility for Android Studio. I wonder how readily we can.
At any rate, Alex said there were changes in flight that would affect this. Once this is checked in and the other dust settles, I'll file more bugs against what it's still doing wrong. In the meantime I'll leave this open as we can't declare victory yet.
The real problem here is that IJ supports modules with a name different from their root directory, and Gradle does not. I wonder if we should disable that facility for Android Studio. I wonder how readily we can.
At any rate, Alex said there were changes in flight that would affect this. Once this is checked in and the other dust settles, I'll file more bugs against what it's still doing wrong. In the meantime I'll leave this open as we can't declare victory yet.
sb...@google.com <sb...@google.com> #5
Trying to rename a module brings up an intermediate dialog which asks if you want to rename the directory or the module. If you choose "module", it just renames it in the IML, and bad things happen. This dialog should be removed and renaming the directory should be the only option.
sb...@google.com <sb...@google.com> #7
This is related to 56178; see comment #7 there.
xa...@android.com <xa...@android.com> #10
This bug was filed for a very early pre-1.0 version of Studio. If this is still an issue in 1.0 or later, please file a new issue. thanks!
Description
OS: Fedora 19, up-to-date
JDK: 1.8
Renaming a module's directory name and/or the module's name itself creates a mess.
First, when renaming the module's directory, the settings.gradle is not changed to reflect the new name. It should, because it contains the app modules references.
Second, if the module directory name and the module name are different, then after reopening the project, a new module is created with the directory name (a new <module_directory_name>.iml). Also, in .idea/modules, references to two modules are present (the old and the new).