How to change Android App Name and ID of an existing application?

后端 未结 11 1570
刺人心
刺人心 2020-12-29 23:01

I have two Android projects in Eclipse. I copied the one project from the other, then changed the app name (in strings.xml) and the project name

相关标签:
11条回答
  • 2020-12-29 23:21

    An application's unique identifier is the package name. If you change the package name and reinstall the app again, you will end up with two copies on your phone.

    Eclipse can change it on all the places of your code automatically.

    Just right click your project on the package explorer (project tree) and go to Android Tools->Rename Application Package

    Voilà.

    0 讨论(0)
  • 2020-12-29 23:23
    1. Change applicationId on app gradle.

    2. Change file_provider_authority in strings.xml

    3. If you are using firebase then add new project on firebase and download the new google-services.json file and replace the old one with this.

    Optionally change your app name as well.

    0 讨论(0)
  • 2020-12-29 23:24

    For those who aren't using Android Studio and want to do it manually (e.g. if you're using React Native), I just recently went through this and had to change it in the following files:

    index.android.js
    android/settings.gradle
    android/app/build.gradle
    android/app/src/main/AndroidManifest.xml
    android/app/src/main/java/com/<app id>/MainActivity.java
    android/app/src/main/java/com/<app id>/MainApplication.java
    
    0 讨论(0)
  • 2020-12-29 23:27

    Package name (in java).

    The app name is also in the manifest, although I don't think that needs to be unique, but still would be good to change it for clarity.

    0 讨论(0)
  • 2020-12-29 23:27

    if you are using Android studio then
    Your project identifier is in your build.gradle file just change the field applicationId "com.example.whatEver"
    Hope it will work

    0 讨论(0)
  • 2020-12-29 23:30

    For Android Studio users, you need to change your package name in AndroidManifest.xml and also in build.gradle file --> defaultConfig--> applicationId.

    0 讨论(0)
提交回复
热议问题