Copy existing project with a new name in Android Studio

后端 未结 19 2262
野趣味
野趣味 2020-11-29 17:31

I would like to copy my Android project and create a new project from the same files just with a different name. The purpose of this is so I can have a second version of my

19条回答
  •  -上瘾入骨i
    2020-11-29 17:42

    As free3dom pointed out, here's what should be done:

    1. Create a copy using file manager
    2. Manually edit the app's build.gradle file to change the package name (you can use the file manager).
    3. Manually edit AndroidManifest.xml to change the package name.
    4. Run gradle sync.
    5. Open the project in Android Studio, and refactor the package name.
    6. Run gradle sync, again.

    That seems to work without any problems.

提交回复
热议问题