简体   繁体   English

Android Studio“错误安装APK”到小米手机

[英]Android Studio "Error Installing APK" to xiaomi phone

I am developing an app in android studio and I use xiaomi mi a1 to run it on it.我正在 android studio 中开发一个应用程序,我使用 xiaomi mi a1 在它上面运行它。 I turned on USB debugging and USB tethering and I do see the phone in android studio devices.我打开了 USB 调试和 USB 网络共享,我确实在 android studio 设备中看到了手机。 The problem is that when I try to run it after some time it says "Error Installing APK".问题是,当我在一段时间后尝试运行它时,它会显示“安装 APK 时出错”。

Notes:笔记:

  1. I turned off insta run.我关掉了insta run。
  2. When android 8 was on my phone everything worked just fine.当 android 8 在我的手机上时,一切正常。 Since I installed android 9 it stopped working.由于我安装了 android 9,它停止工作。

Anyone knows what's the problem or how to fix it?任何人都知道是什么问题或如何解决它?

EDIT: When I turned off insta run there was no error but it kept "installing apk's" for about 20 minutes and the app didn't load on the phone (On other phones it took max 1-2 minutes).编辑:当我关闭 insta run 时没有错误,但它保持“安装 apk”大约 20 分钟,并且应用程序没有加载到手机上(在其他手机上最多需要 1-2 分钟)。

Settings -> Additional Settings -> Developer options ->设置 -> 其他设置 -> 开发者选项 ->

1) Turn off "MIUI optimization" and Restart 1)关闭“MIUI优化”并重启

2) Turn On "USB Debugging" 2)打开“USB调试”

3) Turn On "Install via USB" 3)打开“通过USB安装”

4) Set USB Configuration to Charging 4) 将 USB 配置设置为充电

Make sure you have insert sim in your mobile, else app will not installed in your mob and always through error.确保您已在您的手机中插入 SIM 卡,否则应用程序将不会安装在您的生物中,并且总是会出错。

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

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