Copy existing project with a new name in Android Studio

后端 未结 19 2334
野趣味
野趣味 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条回答
  •  广开言路
    2020-11-29 17:56

    In Android Studio 4.0 you need only these few steps:

    • in File Manager copy the project directory and rename the new one
    • enter in it and change applicationId inside app/build.gradle
    • open the existing new project in Android Studio
    • open one class file and highlight the package name part to change (e.g. from com.domain.appname to com.domain.newappname highlight appname)
    • right click on it -> "refactor" -> "rename"
    • choose "rename package"
    • in the dialog choose "Scope: all places" and click "preview" or "refactor"

提交回复
热议问题