Wednesday, October 12, 2016

Installation of Multiple Instances of the Same Android App

Sometimes, you have your template app, from which you develop different apps. However, Android will count apps that have branched from the same app as one app.

Say you have your template app T. You modify T and create app A. You also create app B by modifying another copy of T. Now, you want to install both apps A and B into your phone, but it won't work; one will overwrite the other, because A, B have branched from T.

One way to install both A and B on a single phone is to change their applicationid in the app's build.gradle file. In most case, the applicationid is identical to the main activity package name. Make sure to change the top-most name of applicationid. After the change, build clean and invalidate caches and restart Android Studio. 

Now, you should be able to install both A and B as long as their applicationid's are different.

No comments:

Post a Comment