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.