4

I am using Redmi Note 4 and trying to install Apk through Android Studio and getting the error while launching the app

DELETE_FAILED_INTERNAL_ERROR
Error while Installing APKs

I have already given all the necessary permissions like install via USB.

Varun Ajay Gupta
  • 349
  • 1
  • 3
  • 11

4 Answers4

18

It's Because of the instant run.

In case you are running a device with MIUI, Developer Option > Turn on MIUI optimization and turn it off.

Reboot your device and recompile the code.Instant Run will work again!!!

Daksh Gargas
  • 3,498
  • 2
  • 23
  • 37
Anjal Saneen
  • 3,109
  • 23
  • 38
4

In case you are running a device with MIUI, you need to do:

  1. Additional Settings -> Developer Options -> Turn on MIUI optimization - Disable this option.

  2. Also, Additional Settings -> Developer Options -> Install via USB: Enable this option

Reboot your device and recompile the code.

Amit
  • 2,389
  • 22
  • 29
2

I had faced same problem in Redmi note 3. It was solved by disable instant run in android studio

Fernando Tan
  • 634
  • 4
  • 14
0

This problem occurred mainly on Android studio version 2.3 or higher, due to Instant Run functionality of these version.

MIUI Optimization creates issues in case of non-MIUI based apps such as Google Apps & Apps from Google Playstore. So Its better to disable if you rely on such Apps.

Reason : Using instant run we push certain code and resource changes to our running app without building a new APK. So it conflicts to MIUI optimization also.

=> For disable MIUI Optimization follow below instructions :

1) Setting > Additional settings > Developer options.

2) At bottom, here is an option Turn on MIUI optimization.

3) Disable to MIUI optimization > Click Turn off & reboot.

Bhunnu Baba
  • 1,742
  • 15
  • 22