Copy existing project with a new name in Android Studio

后端 未结 19 2264
野趣味
野趣味 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:48

    The purpose of this is so I can have a second version of my app which is ad supported in the app store.

    Currently the best way to do it is without copying the project.
    You can do it using diffent flavors in your build.gradle file.

     productFlavors {
            flavor1 {
                applicationId = "com.example.my.pkg.flavor1"
            }
            flavorAdSUpport {
                applicationId = "com.example.my.pkg.flavor2"
            }
      }
    

    In this way you have only a copy of the files and you can handle the difference easily.

提交回复
热议问题