Xiaomi phone can't run Android Studio program directly

Source: Internet
Author: User

Xiaomi phone cannot be directly run Android Studio program reprinted from: Http://www.jianshu.com/p/6588c69b42cfProblem Description:

After upgrading to the 2.3 version of Android studio, Xiaomi Mobile Miui cannot run the Android studio program directly by clicking on it, reporting the following error:

Installation failed with message failed to establish session.
It is possible the this issue are resolved by uninstalling an existing version of APK if it's present,and then re-install Ing.

Method One: Set the option in Instant run in Android Studio to not select
    1. Locate the option in instant run according to the following path
      File--> settings--> Build, execution,deployment--> Instant Run
    2. Remove the Select box for the Enable Instant Run to hot swap code/resource changes on deploy (default enabled).

      Solution1.png
    3. Click Apply, save the settings will be OK.
      At this time, you can run the program directly on the Xiaomi phone by clicking Run.
Method Two: Turn off MIUI optimization in the developer options of the phone
    1. Go to the phone developer mode, at the bottom there is a Enable MIUI optimization option, turn off this option will prompt to restart the phone, choose to shut down and restart the restart, run our program again, you can run on the phone.
As a result, the Instans run function, which is turned on by default after upgrade 2.3, can be resolved ~

Xiaomi phone can't run Android Studio program directly

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.