Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install android app via usb debugging

I know this is an old question but I am trying to install my app the very first time on Redmi note 4. Whenever i try to install it displays a dialog saying..

Installation failed with message Failed to establish session. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing. WARNING: Uninstalling will remove the application data! And it gives error after this.

This app is not installed before,I have cleared cache,rebuild the project,restarted my phone but nothing is working.

like image 918
shubhamjuneja Avatar asked Mar 06 '17 12:03

shubhamjuneja


People also ask

How do I fix USB Debugging not working?

On many Android devices, you can verify whether USB debugging is enabled by visiting the Settings|Developer Options page. Install the USB driver for your Android device. If the battery in your Android device gets exhausted, first recharge the battery and then install the USB driver again.

How do I enable installation disabled USB?

All you have to do is Turn your Wi-Fi off, turn on mobile data, and then enable the setting for "Install via USB". It'll go through.

How do I grant permission for USB Debugging?

On the device, go to Settings > About <device>. Tap the Build number seven times to make Settings > Developer options available. Then enable the USB Debugging option.


2 Answers

How to disabling Miui Optimizations

This issue was happening on my phone which is Xiaomi Phones running on Miui 8. After turning off Miui Optimizations on Developer Settings, restarting the phone a recompiling the application it worked.

for more detail: android gradle:2.3.0 install apk fail

like image 79
Max Yao Avatar answered Sep 19 '22 16:09

Max Yao


Open

1.File 
2.Settings 
3.Build,Execution,Deployment
4.Instant Run  
5.Un-check (Enable Instant Run to hot swap code)

Its work for me..

like image 20
Sujeet Kumar Avatar answered Sep 20 '22 16:09

Sujeet Kumar