user2666607
user2666607

Reputation:

Installing a production and test version of an app on one device

I'm developing an app named myApp in Android. After completing some important functions I want to keep a build of this version on the device for testing while I continue developing. I renamed myApp into myAppTesting, but android devices understand both to be the same app.

Can you guys help me to solve this problem?

Upvotes: 9

Views: 2033

Answers (2)

Mandrake
Mandrake

Reputation: 115

You should rename your main package.

In Eclipse:

Package Explorer > Right Click on project > Android Tools > Rename Android Package

Upvotes: -1

nhaarman
nhaarman

Reputation: 100358

Applications are identified by their package name.

Give you test app a different package, like com.myapp.dev.

In Android Studio, you can achieve this by adding the following in your app's build.gradle:

android {
     /* More stuff */

     buildTypes {
        debug {
            applicationIdSuffix = ".dev"
        }
    }
}

This way, release builds will have the original com.myapp package, while any debug build will have the com.myapp.dev package, allowing you to keep them both installed.

Upvotes: 13

Related Questions