Ibrahim Amen
Ibrahim Amen

Reputation: 31

uninstalling an existing version of the apk if it is present and then re-installing

I am facing an issue with Instant Run when using an Emulator. I follow the directory and delete that "slice_8" But it's still The Same Error Message ?!

Any ideas how I can solve it?

Here the Error When Instant Run With Emulator in Android Studio

Upvotes: 2

Views: 3655

Answers (3)

Krassy L
Krassy L

Reputation: 11

If you're using BlueStacks as an emulator, you could go into Settings >> Preferences, then scroll down to Platform Settings and check (enable) "Enable Android Debug Bridge (ADB)".

I assume it's the same type of deal if you are using another emulator, just make sure the ADB is on.

Upvotes: 1

Stuti Kasliwal
Stuti Kasliwal

Reputation: 807

  1. Disable(uncheck) instant run in settings > build,execution,deployment > Instant run

  2. then clean your project in Build > clean project

  3. if still problem not solved, then build > make project

  4. run app

Upvotes: 5

Zoe - Save the data dump
Zoe - Save the data dump

Reputation: 28228

Most likely, you installed the currently installed APK from Google Play or some other source that means the certificate used to sign doesn't fully match the existing. A debug and a release certificate is different. The solution is simple. Uninstall it. Press OK and install the app. You can also uninstall it manually from the device/emulator.

If you keep getting the same error even though the certificate is the same, that is a different issue

It has to do with the flavors of the app. For an instance debug and release. Debug has one certificate, release has a different one. While the package may match, and from the ANdroid OS point of view, these apps are the same. But the one you install compared to the existing APK. The apps are the same, but the certificates do not match. So you need to uninstall the existing, as you cannot install an APK if there is a certificate mismatch.

Upvotes: 1

Related Questions