Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Android install error: the package conflicts with an existing package of the same name

ErrorThe package conflicts with an existing package by the same name

Short answer

Android allows only one app per application ID, and an update must be signed with the same certificate as the installed version. The conflict means the installed app was signed with another key, or a second app uses the same ID. Uninstall the old copy, sign with the same key, or give each variant its own ID.

  • Applies to Flutter 3, Android Gradle Plugin 8, adb
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check whether the application ID is already on the device, and which one it is.

    adb shell pm list packages | grep com.example.myapp
  2. 2Match what you see, then jump to its fix

    1. 1The same app installed from a store or another machine, now replaced by a debug or release build from your computerThe installed copy was signed with a different keyFix
    2. 2You need a debug and a release, or two flavors, on the same deviceTwo variants of the app share one application IDFix
    3. 3The template id com.example.something is left in more than one projectA different project reuses the same applicationIdFix

What does the error look like?

  • The package conflicts with an existing package by the same name

Cause 1 of 3

The installed copy was signed with a different key

1Check

Android compares the certificates when it installs an update. A debug build and a release build are signed differently, so they cannot replace each other.

cd android && ./gradlew signingReport

2Fix

Remove the installed copy, then install yours. This deletes the app's local data. For a real update, sign with the same key as the installed version.

adb uninstall com.example.myapp
flutter run

3Verify

The install completes.

adb shell pm list packages | grep com.example.myapp

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 3

Two variants of the app share one application ID

1Check

No two apps on a device can have the same application ID. Look at what each build type or flavor sets.

grep -n "applicationId\|applicationIdSuffix" android/app/build.gradle*

2Fix

Add an applicationIdSuffix to the build type or flavor that must live beside the other.

android {
    buildTypes {
        debug {
            applicationIdSuffix = ".debug"
        }
    }
}

3Verify

Install both builds; they appear as separate apps.

adb shell pm list packages | grep com.example.myapp

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 3

A different project reuses the same applicationId

1Check

Read the applicationId of the project you are installing and compare it with the one on the device.

grep -n "applicationId" android/app/build.gradle*

2Fix

Set an explicit, unique applicationId. Keep it fixed once published, because changing it makes the store treat the app as a new one.

android {
    defaultConfig {
        applicationId = "com.yourcompany.yourapp"
    }
}

3Verify

Build and install; the ID in the package list matches.

flutter run

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Give debug builds their own suffix so a local build never fights with an installed release.
  • Keep one signing key per app and back it up; the key cannot change during the app's life.
  • Replace the template application ID before the first install.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Mobile apps

Gradle cannot find the Android SDK on this machine

FAILURE: Build failed with an exception. What went wrong: SDK location not found.

Gradle looks for the Android SDK in the sdk.dir line of android/local.properties and in the ANDROID_HOME environment variable, and found neither.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.