Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug with Xiaomi mi5 MIUI 8 Android Studio

I cannot launch app from Android Studio. When i click "run", I select my device:

I select the Xiaomi device

And it appears an the following message:

Uninstall app message

But it is not true, the app is not installed in the device. In the "run" console, appears the following:

04/22 15:53:08: Launching app
$ adb install-multiple -r C:\Users\User\AndroidStudioProjects\some.apk
$ adb shell pm uninstall com.package.app
Unknown failure (Failure - not installed for 0)
Error while Installing APK

I have activated USB debugging in the device.

like image 305
aramburu Avatar asked Dec 02 '22 13:12

aramburu


2 Answers

Try TURN OFF "MIUI Optimization" from developer options. I've updated to MIUI 8.2 and encountered same problem, found the solution here and it works. Good luck!

http://c.mi.com/thread-171377-1-0.html [Off-Topic] [Device Team] Fix For Unable to Debug Android App From Android Studio

like image 176
Fisherman Avatar answered Dec 06 '22 11:12

Fisherman


@Fisherman's answer haven't worked for me.

I needed also to uncheck Verify apps over USB and it worked like a charm.

like image 40
Remy Avatar answered Dec 06 '22 10:12

Remy