How to move and rename a project in android studio?

前端 未结 12 1002
一向
一向 2021-02-01 15:33

This should be a really simple question :)

I have a project that works fine. Now I wanted to rename it and to change the path of the projectfolder. First it seemd simple

12条回答
  •  执笔经年
    2021-02-01 16:00

    For Android 3.3.2+

    1. Set your project to the project menu
    2. Select the folder name
    3. In the top menu bar Refactor > Move

    Be sure to select the folder with the project name

    1. Select the directory you want to move to and confirm the move
    2. Close all projects and Import > (moved project)
    3. Uninstall the app from your device

      Important!!

    4. Turn off Instant Run to avoid the apk install process from looking for existing slices (the cache clean does not do this, apparently). This is from the SO answer here. File > Preferences > Build, Execution,Deployment > Instant Run > Uncheck the enabled box

    5. Top menu bar -- File > Invalidate Caches / Restart (I invalidate only)

    6. Run the app 10.You can now turn Instant Run back on in Preferences.

    That should do the trick

提交回复
热议问题