When I was using Android studio, I used my own Meizu (M5 Note) to debug the machine, running unsuccessfully, prompting the error in the image below (Session ' app ': Error installing APK).
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/8D/AE/wKiom1ilpz3iJnBFAAAgNMl9D7A574.png "title=" Qq20170216211918.png "alt=" Wkiom1ilpz3ijnbfaaagnml9d7a574.png "/>
After testing several kinds of online methods, special record as follows, look after everyone less detours, hope can help everyone.
The methods that may be used by different people will be the following different methods:
1) after connecting the mobile phone, there will be the SDK model of the display phone and the version of the API, show my own is Meizu M5 Note (Android 6,api23), on my phone is not installed on, just beginning someone said Meizu phone compatibility this piece did not too good, changed someone's cell phone test a bit, But also Meizu series M2 Note (Android 5,api22), version lower than my one level, but can be installed completely, it appears that recompile is unreliable;
2) reseat The phone data cable, or not;
3) The guess is that the SDK build tools are not fully downloaded, so the SDK tools are updated and downloaded, and Android Studio is restarted, or not installed;
4) Online There are methods that need to kill the Android background process Adb.exe, but also in cmd cmd adb kill-server Restart the ADB and restart the Adb.exe method, and then unplug the phone, reinstall, or not line;
5) There is also the argument that you need to change the settings of studio, and in Settings, remove the tick of the first check box in instant Run, see:
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8D/AB/wKioL1ilqa_DCbujAAGJSnbNs6I728.png-wh_500x0-wm_ 3-wmp_4-s_2267197590.png "title=" S.png "alt=" Wkiol1ilqa_dcbujaagjsnbns6i728.png-wh_50 "/>
Re-compile or not;
6) may also be the ADB port is occupied, this I did not test, is after looking at the information on the Internet to see, see whether 5037 Port is occupied
How to: Command line input netstat-aon|findstr 5037 view 5037 Port process
If you see 3213 using the port, enter Tasklist|findstr "3213" to see which program created the process, and if not adb, taskkill/f/pid 3213 kills the process
Then Plug and unplug the phone data cable, as if still do not recognize;
7) Finally found the reason is that my phone Meizu upgrade flyme6 system, mobile phone comes with the software phone butler with the USB installation management function, it has blocked the installation, after it is closed, you can install the app properly.
This article from "JJ a person's Travel" blog, reprint please contact the author!
Android Studio session ' app ': Error installing APK bug solution