Solve the problem that the Xiaomi mobile phone cannot install the app with Android studio

Original address: https://blog.csdn.net/wy1992610/article/details/56482356


In the past two days, my Xiaomi mobile phone cannot install the app when running directly with Android studio. This has not happened before. So looking for various solutions.

1. INSTALL_FAILED_USER_RESTRICTED error: upgrade MIUI8. I upgraded the system to the latest, and then turned on several debugging-related options in the developer options: usb debugging, USB installation, etc. There are also security housekeepers that allow the installation of unfamiliar applications, etc. After this, I was able to debug the application with studio smoothly.

2. After the above method is successful, after debugging several times, it suddenly cannot be installed again, and the prompt is: installation failed with message failed to establish session. In this case, I got a solution on stackoverflow: Turn off "Enable MIUI optimization" in the developer options, and after the system restarts automatically, you can successfully use studio to debug the application.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325551739&siteId=291194637