Does not install apk


I am developing an app in Java for Android.

When testing the application (debugging) on a smartphone, it installs and runs well.

My problem comes when I install the application in production. I generate the signed apk without problems (Android Studio does not show me any errors or warnings), I switch to the smartphone (via USB or bluetooth) and when installing it I get an error and it does not install.

It does not show me any error message and as I said before, if the "debugeo" on the smartphone is no problem but the signed and final apk is not installed.

I have discarded the issue of the android versions since, as I said, I can emulate it on the device.

Any ideas? By not showing me an error message, I can not find out more online.

asked by Pablo Simon DiEstefano 23.08.2018 в 14:52

2 answers


To explain why you have this problem remember that:

The application you sign for Google Play Store uses a Keystore other than the Keystore used when you upload the application from Android Studio to your emulator or device.

The problem is generated when you have an installed version created by different Keystore , therefore these conditions may exist:

  • If you have the debug version installed and you try to upload the signed version for the Google Play Store, an error will be displayed and the application can not be installed since they were signed with different Keystore.

  • If you have the debug version installed and you try to upload the signed version for the Google Play Store, and both have different versionCode , Google Playstore will actually show that it is already installed.

  • If you have installed the signed version for Google Play Store and you try to install from Android Studio , it will mark error INSTALL_FAILED_INVALID_APK but it will show a message, where it will ask if you decide to uninstall the current application (Google Play Store) and install the version of Android Studio .

The first condition is the one you are experiencing, in this case the solution is that you must uninstall the version of the application that is installed.

answered by 23.08.2018 в 23:05

I have found the solution (although I do not know why the problem occurred).

I have taken the solution to the following question: link

To fix the fault, as the answer I have said the link, was to mark two options in Android Studio when generating the installer.

answered by 24.08.2018 в 12:48