Reputation: 1899
Hi I am developing an application that your use is private and i prefer not to upload to Google play.
When the app opens check if exist new updates in a server, if exist download the apk and then install
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/ipacUpdates/ipac.apk")), "application/vnd.android.package-archive" );
this.ctx.startActivity(i);
When the installation finishes shows this error
an existing package by the same name with a confilcting signature is already installed
Both apk builded with the same machine and tested on avd emulator
.
What can be happening?
Upvotes: 1
Views: 15486
Reputation: 16813
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'
Upvotes: 2
Reputation: 20381
I had the same issue, you need to the running app have the same signature as what you are upgrading to. When you run the app through the emulator it gets the dev signature.
What I did was run the emulator, remove the program, then do a manual install of my app from the internet, then tested the upgrade by having my app upgrade itself. Both were signed with the production signature, so it was able to happen.
For more info reference: Android App Not Install. An existing package by the same name with a conflicting signature is already installed
Upvotes: 0
Reputation: 1058
Probably one is signed with the default debugkey, and the another is signed with your own key. Make sure that both versions are builded the same way. Either you upload it to Play or not, you should have your own keystore, and sign with that. For more, check the following link.
Upvotes: 2
Reputation: 382
If you own the application you are trying to install then just increment android:versionCode="??"
and android:versionName="??"
in the AndroidManifest.xml
and generate the app again.
I hope this helps.
Upvotes: 1