1

I want to install on my phone the production and development apks of my Android app, which initially are going to be exactly the same.

The only thing that I have changed so far is <application android:label="@string/app_name"> in the AndroidManifest.xml to a different string.

However, when I try to install the new APK on my device, it detects the app as an update of the production one.

What can I do to make my phone understand that these are two different apps?

  • just an addendum, the official answer shows just for `flavour` and `flavour2` but for debug/release you use `debug` `release`as shown by Jonik answer in the same question. – Budius Aug 03 '15 at 11:16
  • I am not using Gradle –  Aug 03 '15 at 11:18
  • Well, you didn't specify the build system, so me and all the others from what I can read on their answers assume you were using the latest supported build system. Also if you're using Eclipse/Ant I would like to inform you that it has been deprecated and that Android team is not updating it anymore. Also I can safely assure you that it is very very difficult to accomplish what you want using Ant. Said all that I'll re-open the question but I strongly advise you that at least mention on your question which build system you're using already you will not get relevant answers. – Budius Aug 03 '15 at 11:22
  • Also, here is the answer that I originally pointed as duplicated, just for reference: http://stackoverflow.com/questions/18491649/how-to-change-the-android-app-package-name-when-assembling-with-gradle – Budius Aug 03 '15 at 11:22

2 Answers2

0

You have to change the applicationId of the app. That is used as a unique identifier in the play store and on your phone.

The applicationId is in your build.gradle in the main app folder:

defaultConfig {
   applicationId "com.example.myapp"

During the build gradle will generate the package name in your manifest from the applicationId.

Janusz
  • 187,060
  • 113
  • 301
  • 369
-1

You have to change to package name of application. Then you can easy to install application different one.

com.something.somthing set on you application package.

Change at project/src/com.package.package

And chnage at manifest

Ravi Vaghela
  • 3,420
  • 2
  • 23
  • 51