vaenow / cordova-plugin-app-update

App updater for Cordova/PhoneGap
MIT License
299 stars 146 forks source link

Package with the same name? #67

Closed arthurflor23 closed 6 years ago

arthurflor23 commented 6 years ago

Hey, When I try to install another application that uses the plugin, android returns this message:

Android App Not Install. An existing package by the same name with a conflicting signature is already installed

Some tip?

vaenow commented 6 years ago

Hi @arthurflor,

I googled some tips for you. This is most likely a problem with your APK signature

Vote 58

The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.

Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.

Vote 171

I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.Solution: I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'

https://stackoverflow.com/questions/19959890/android-app-not-install-an-existing-package-by-the-same-name-with-a-conflicting

arthurflor23 commented 6 years ago

Hi, I'm using Ionic, but I checked and it didn't work. The curious thing is that when removing the plugin, I can install normally (creating the APK with the same commands). :/

johnha90 commented 6 years ago

Hi, i developed an apps using this plugin. i installed the app, working well. when i installed another app with the same plugin, i faced the same problem. / An existing package by the same name with a conflicting signature is already installed / can you check for us to resolve this issue.

ttgzs commented 6 years ago

Hi,I have the same problem. two app is different packagename,when i installed another app with the same authority provider;

ttgzs commented 6 years ago

hi,Validated, after 1.3.5 in AndroidManifest. XML, add

<provider android:authorities="com.vaenow.appupdate.android.provider" android:exported="false" android:grantUriPermissions="true" android:name="com.vaenow.appupdate.android.GenericFileProvider">

, resulting in build apk, has the same signature。now ,I ‘m using 1.3.5

vaenow commented 6 years ago

Hey guys, do you have any advices ? 🆘

loban commented 6 years ago

I made a PR that fixes this! https://github.com/vaenow/cordova-plugin-app-update/pull/80 I had made an earlier PR that fixed it, but it got removed by other commits later.

mojiaming commented 6 years ago

Hi,I have the same problem.How to solve?

loban commented 6 years ago

@mojiaming, until my pull request is merged, use my fork at https://github.com/loban/cordova-plugin-app-update or https://www.npmjs.com/package/cordova-plugin-app-update-fork

samsonps01 commented 6 years ago

@loban I tried using your fork, it gives me following error when I run "ionic cordova run android"

Err: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unhandled "error" event. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)

Can you help me with this?

loban commented 6 years ago

@mojiaming That error seems unrelated to this plugin. Please uninstall this plugin and double check if the error is still there or not. BTW, my patch has been merged so you can try the mainline plugin again. I'll keep my fork up until this plugin has a new release or two.

vaenow commented 6 years ago

Thank you so much for your path. @loban

loban commented 6 years ago

You're most welcome, @vaenow! :-D