Advise on renaming a Android project in Android studio(Gradle based)

后端 未结 3 1061
南方客
南方客 2021-01-05 16:34

In my present project , I wish to rename the Android project in Android studio (0.8.9) and wish to use it hereafter. I know about 2 solutions discussed in forum. Could some

相关标签:
3条回答
  • 2021-01-05 17:07

    I found an easy way to solve this.

    Open Android Studio, File -> Invalidate Caches / Restart -> Invalidate Caches & Restart.

    0 讨论(0)
  • 2021-01-05 17:17

    In Android 1.5.1 tested and worked:

    1. Open Project folder (you could open it through Android studio itself see this
    2. make sure Android Studio Is closed
    3. change the yourOldProjectName.iml to the new name
    4. rename the parent folder to same new name.
    5. re-open Android Studio --> File --> Open--> path to your renamed.iml
    0 讨论(0)
  • 2021-01-05 17:21

    The following works for me when renaming the project:

    • Close Android Studio
    • Delete the *.iml file(s) in your project's root directory
    • Delete everything in the .idea directory except workspace.xml and tasks.xml.
    • Rename your project's root directory to the new project name
    • Restart Android Studio and import the project from the renamed directory.

    Note: If you don't care about losing your workspace settings (window sizes, etc.) and you don't have any tasks then you can just delete the .idea directory entirely.

    0 讨论(0)
提交回复
热议问题