简体   繁体   English

在Xaomi Redmi Note 4上无法安装来自亚行的Android APK

[英]Unable install Android APK from ADB on Xaomi Redmi Note 4

I am using Redmi Note 4 and trying to install Apk through Android Studio and getting the error while launching the app 我正在使用Redmi Note 4并尝试通过Android Studio安装Apk并在启动应用程序时收到错误

DELETE_FAILED_INTERNAL_ERROR
Error while Installing APKs

I have already given all the necessary permissions like install via USB. 我已经提供了所有必要的权限,比如通过USB安装。

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 . 如果您正在运行具有MIUI的设备,则Developer Option > Turn on MIUI optimization并将其关闭

Reboot your device and recompile the code.Instant Run will work again!!! 重新启动您的设备并重新编译代码.Instant Run将再次运行!

In case you are running a device with MIUI, you need to do: 如果您正在运行具有MIUI的设备,则需要执行以下操作:

  1. Additional Settings -> Developer Options -> Turn on MIUI optimization - Disable this option. 其他设置 - >开发人员选项 - >打开MIUI优化 - 禁用此选项。

  2. Also, Additional Settings -> Developer Options -> Install via USB: Enable this option 此外,其他设置 - >开发人员选项 - >通过USB安装:启用此选项

Reboot your device and recompile the code. 重新启动设备并重新编译代码。

我在Redmi note 3中遇到了同样的问题。它是通过在android studio中禁用即时运行来解决的

This problem occurred mainly on Android studio version 2.3 or higher , due to Instant Run functionality of these version. 由于这些版本的Instant Run功能,此问题主要发生在Android studio 2.3或更高版本上。

MIUI Optimization creates issues in case of non-MIUI based apps such as Google Apps & Apps from Google Playstore. MIUI优化会在非基于MIUI的应用程序(例如Google Play商店中的Google Apps和Apps)中产生问题。 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. 原因:使用即时运行,我们将某些代码和资源更改推送到正在运行的应用程序,而无需构建新的APK。 So it conflicts to MIUI optimization also. 因此它也与MIUI优化相冲突。

=> For disable MIUI Optimization follow below instructions : =>对于禁用MIUI优化,请遵循以下说明:

1) Setting > Additional settings > Developer options. 1)设置>其他设置>开发人员选项。

2) At bottom, here is an option Turn on MIUI optimization . 2)在底部,这是一个选项打开MIUI优化

3) Disable to MIUI optimization > Click Turn off & reboot. 3)禁用MIUI优化>单击关闭并重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM