Recently with a red Rice 4 High Edition (6.0) and Vivo X9 (7.1) To do the test machine, it is the latest version of the Millet MIUI system MIUI8, my as is the 2.3 version, on the Internet to view the relevant issues, In Xiaomi 5 and red Rice note4x and other equipped with the MIUI8 system of mobile phones have encountered the same problem, so I believe that the first time you use the MIUI8 system phone to test will certainly encounter these problems. Below to enumerate oneself in the development use MIUI8 encounters the pit, also hoped can help everybody quickly solves the problem.
1.Installation failed with message Install_canceled_by_user.
It is possible that this issue was resolved by uninstalling an existing version of the APK if it was present, and then re-in Stalling.
Cause: The USB installation is not turned on in the developer options.
Solution:
Open the developer options for your phone (how to open your own Baidu), then find "USB Install", set to on state.
2.Installation failed with message failed to establish session
Reason: No MIUI optimizations are turned off in developer options
Workaround:
Developer options, start MIUI optimization Cancel Open
3.installation failed with message failed to finalize session:install_failed_invalid_apk
Reason: The background of this problem is that when I go through the problem 1, I can successfully install the program, but after I modified the code to reinstall, directly pop the window, when I click OK, the error, the installation failed.
Solution:
File->setting->build->instant Run
Above is