0

I want to use an existing Android application as the foundation of a new project in Android Studio, then wish to make changes to the code and create a new application which is completely unrelated to the cloned one. However, I seem to be doing something incorrectly like renaming the project in Android Manifest, or perhaps dissociating the existing repository from the new project.

This is what I have done:

  1. Clone Github Repo into New Project
  2. Rename project in Android Studio
  3. Changed the Github remote location and pushed to a new repo

I have then proceeded to make all my changes to the new application, but when launching on Android Studio via USB debug or via APK, it overwrites the originally copied application which I already have installed on the mobile device.

What am I doing wrong so the new duplicated application won't overwrite the existing application?

I have read a few answers on how to correctly clone an Eclipse project, however I need to clone and duplicate a project in IntelliJ.

Imran
  • 75
  • 8
  • I think you have to [change the application id](https://developer.android.com/build/configure-app-module). It's what Android uses to identify an application to be "the same one" as an earlier version. – Joachim Sauer May 12 '23 at 11:32
  • @JoachimSauer Application ID isn't in the Manifest. Could it be anywhere else? – Imran May 12 '23 at 11:42
  • It should be in your build configuration (Gradle by default). If you never set it at all (which isn't recommended), then it defaults to the namespace. – Joachim Sauer May 12 '23 at 11:52
  • Thank you so much. This worked, I have renamed the Application ID in the build config and now I can install and use it successfully on device. As a sidenote, I had not set the Application ID specifically, therefore it had defaulted to the namespace. What should the Application ID be? Any alpha-numerical identifier for my own identification, or something more specific? – Imran May 17 '23 at 08:29
  • 1
    The link I provided above also tells you what structure the application id should have. – Joachim Sauer May 17 '23 at 08:33

0 Answers0