Mark Gallos
Mark Gallos

Reputation: 61

Creating different app with the same project (AndroidStudio)

I have to test something on my app. I do want create another apk with the same project but i have to install both, the latest and the old one. How can i possible to do this without creating a new prject? thanks

Upvotes: 2

Views: 1734

Answers (2)

Jacob
Jacob

Reputation: 1

see this link

https://stackoverflow.com/a/18329481/5649082

according to this link

  1. copy your project to another directory and rename folder
  2. open it in android studio
  3. right click on package name and refactor -> rename
  4. (optional) change app name in res-> values and in build.gradle -> defaultConfig -> applicationId

Upvotes: -3

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363477

You can do it with a buildType. Something like:

buildTypes {
        debug {
            applicationIdSuffix ".debug"
        }

}

Or you can do it with a flavor

 productFlavors {
        f1 {
            applicationId = "com.example.my.pkg.f1"
        }
        f2 {
            applicationId = "com.example.my.pkg.f2"
        }
}

Upvotes: 6

Related Questions