App not installed error when upgrading app - android

When trying to manually install an apk (v2.0) over an .apk (v1.0), I get the error "APP not installed" error on my device.
I should note that both of the .apk are the same app, only the version is upgraded.
I am also using release version of the apk and I don't want to uninstall the existing app (just upgrade).
Can anyone help me identify what might be the cause of this problem?
Thank you.

upgrade app scenario works when the version code of both the apks should be different. The incoming version should have a higher VersionCode (not VersionName) than that of the existing app. Just Verify that versionCode of both the apps are different. This can be verified by play store console (for the existing build from play store) and app > build.gradle

Related

The application does not install a second time

I sign the APK, I choose the type of Debug, I distribute it directly, I will not upload it to Google Play.
I install. But the problem is that I try install the same APK back, it does not install writes.
1) I tried to delete, delete for all users and again, all in vain. One version helps, I raise version code to 2, version name to 1.1, sign and roll back this data and sign again. Only then installed.
2) Disabled “Check security threats” on Google Play, and works fine
3) Even if you put it on Google Play in closed testing and from there download the APK and install, the problem disappears
Then again, install the same APK does not work.
Maybe someone came across this, tell me?
If you are using ADB, you need to use the -r flag,
here is the docs: https://developer.android.com/studio/command-line/adb
Here is the command:
adb install -r path_to_apk
When installing from a downloaded file the versionCode always needs to be higher than the one currently installed to allow for a new installation.
versionCode — A positive integer used as an internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName setting, below. The Android system uses the versionCode value to protect against downgrades by preventing users from installing an APK with a lower versionCode than the version currently installed on their device.
The value is a positive integer so that other apps can programmatically evaluate it, for example to check an upgrade or downgrade relationship. You can set the value to any positive integer you want, however you should make sure that each successive release of your app uses a greater value. You cannot upload an APK to the Play Store with a versionCode you have already used for a previous version.
Reference: https://developer.android.com/studio/publish/versioning
find the project in Your projects_folder for example
and go into your Project which is not install........
go into the gradle/.....and find the apk folder and delete it
MyComputer/D/Newfolder/.....
2.go into the gradle/.....and find the apk folder and delete it
3.After all run project again

Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version

I want to run my application in phone but I get following message:
Installation failed with message:
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match
the previously installed version; ignoring!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
In my phone I have installed previous version of app from google play. I know that uninstalling old version of app from my phone can fix the problem but I don't want to do this because then I might lose all app specific data.
What I tried:
generating signed version of app using the same keystore.jks like previously
changing versionCode and versionName in build.grandle file and then generating new version of app
And still I have the same problem. What should I do to update my app without losing data?
There are two possibilities I can think of
You use Google Play App Signing. If you use Google Play App Signing then the signature in apps coming from Google Play will always be different to the app coming from your IDE. The only way you can get the update to work is to update the app from Google Play. The best way to do this during development is to use an "Internal test track". Google launched these at Google I/O this year and they let you update your app in seconds from Google Play. So when you have an update, don't install from your IDE, upload to Google Play internal test track, republish, and then update from Google Play. It is really quick.
You don't use Google Play App Signing, but you are trying to install your debug build instead of your release/production build. Make sure you are building the production release APK, so it is signed with the same key as the one uploaded to Google Play.
If I'm understanding correctly you want to re install the "same" apk in your phone but with some changes in the code (updates) but Android Studio can't install the new apk.
I can only think in one thing, this is the explanation:
Please remember that android has different "Build Variants" there could be many but you will always have "debug" and "production" build variants, as I can read, you have installed the one in Play Store this means that you have a "production" build variant already installed in your phone, so you need a new "production" variant version of your app with the same build data (code and name version) and the updates in the code.
Build a signed apk with the same data as the previous version (code and name version) (Just like the one you used to upload to Play Store).
Find the signed apk.
Use adb to check your connected devices, expect a list
adb devices
Use adb to install this new apk.
adb -s <device_identifier> install <apk_name_include_apk>
Following those steps should let you install what you need.
Go in your React Native > Android >app
in the app folder,
you can see a build just delete this folder and Clear React Native project by npm cache clean cmd/Terminal Command.
Now try to run I hope it will Run for some of you.
It's working for me.

App not installed, when sends to compatible versions

I have the application that has '16' mini sdk and '27' targeted sdk versions. When I install the application with USB cable from android studio, it works fine. But when I send the application to other phones b/n 16-27 sdk versions, It appear
App not installed
error on the phone. I had used xender to send the application.
My sdk versions are here :
Sometimes App not installed occurs when a same version of the app already exists.
Either increment the versionCode of the app or uninstall the
previous app.
After that, create a signed apk using
Build->
Clean Project followed by Build->
Generate Signed APK
After looking at the screenshot (build.gradle) you shared here, I might advice to put versionCode after versionName. That way, you don't have to bother about what versionCode is written in AndroidManifest.xml.
Based on your comment the problem is that you are using a build built by Android Studio.
Android Studio will add a testOnly attribute so that's why you can't install it on other devices by default.
You need to send a build built by Build -> Build APK(s) or Build -> Generate Signed APK to be able to install it on devices.

"App not installed" message when installed apk

So I have an app on the Play Store that I released about a week ago. I've done a ton of work to to it since and I'm basically going to rebrand it a bit.
When I first released the app, I put it up on the app store with the name "First Name of App" (obviously not the correct name). I now have an update ready to publish with a lot of changes, and one change is that the app name is now "Second Name of App". It's all under the same package yet, I just changed the name using the Manifest.
I'm having an issue though with testing. Currently on my own phone, I have the version of the app that is currently on the Play Store installed.
I generated a signed APK using Android Studio (all with the same settings and key passwords and such). I then put that signed apk on my phone for testing, and when I try to install it I get the "App not installed" message.
Things I have tried:
Uninstalling the previous APK and then installing the newer version. If I uninstall the Play Store version first, and then install the newer signed APK version, it installs fine. The problem with this though is that I lose the data that I had in the Play Store version. I can't have that.
Changing the "versionCode" and "versionName" numbers in the build.gradle. I made sure both numbers are higher than what the Play Store version is, but I still get the same "App not installed" message.
Making sure the settings while generating the signed APK are the same. All of the settings are exactly the same. The signature version checkboxes are both checked yet also, as they were with all previous versions.
Anyone have any ideas what could be going on? I really would like to release this update but I'm afraid if I just upload this signed apk to the store that everyone would have the same issue, and that they'd be forced to uninstall the current version they have (resulting in data loss).
The problem seems that you are trying to install an APK with the same package name but different key and that creates a conflict. Android only considers an App to be the same if both package name and key signature are identical.
Keys are unique, even if you use the same settings and passwords each time you create a key a new unique key is created and it will be always different to the key you used in the Play Store release.
The only way to install the APK is to uninstall the Play Store version.
And that serves to emphasize how important it is to keep the key used in the Play Store, if you lose it you will not be able to upload new updates.
UPDATE
If your have "Google Play App Signing " activated for you app, the key used when an user installs the app from Play Store is different than the one you used to upload the release to the Play Console.
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en
Have you by chance changed the minimum SDK version or anything like that? I've had a similar issue. I've an app on the PlayStore which I tried upgrading with an APK with the same signature as that of the PlayStore version but a different minimum SDK version. When I tried installing I get the 'app not installed' error. I then uploaded this APK on the PlayStore. On my device, the app on the PlayStore now shows two options 'Uninstall' and 'Open'. Due to your conflict, users will have to first uninstall the app and install it again. There will be no 'Update' option due to the conflict. Hope this helps :)
Similar Issue
Android Phone: Google Pixel3, Android 9
install youtube apk, but error:
Application Not Installed = App Not Installed
Final Solution
use adb's pm to install apk
even same error, but can show/known the fail reason
then can find specific solution to fix it
Examples
here later encounter many error cases:
blueline:/storage/emulated/0/Download # pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
or:
blueline:/data/local/tmp # pm install youtube_16.29.36_addedDebuggable.apk
pm install youtube_16.29.36_addedDebuggable.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl445467286.tmp/base.apk: Attempt to get length of null array]
then google it and find specific solution to fix it, install apk successfully.

No option to update new version of Android application

I have published new version of Android application to play store. But I do not have 'update' button for updating from previous version. I have only 2 options 'Open' and 'Uninstall'.
For new version I need to uninstall existing and then download new version. I am generating signed APK and using the same key. I have also changed the version code and version name.
Is there anything I need to add in code for autoupdate? I need to avoid uninstalling everytime I have new version of application published to play store. Please give me any solution if you have.
When did you push the app? It may take several hours before it's live. The Play Developer Console should provide some info on when the rollout is available. It may be possible to specify a rollout time when the update will be live.
If you have been debugging the app on your phone, and the version code is the same as on your phone or your app is the debug signature, you won't be asked to update.
you should change the version code and version name in your gradle file of app module
I think you changed version code in manifest file instead of gradle file.or you changed version in wrong gradle file

Categories

Resources