In my case, I had a similar problem with the connected device, and not a single proposed solution, such as Clean \ Rebuild \ Restart \ Reinstall \ etc, could help me. At the same time, everything worked perfectly on AVD, the last code was deployed normally.
I found that the question asked depends on the settings selected in the [USB Developer] section on the connected device (mine was a Xiaomi smartphone). Since some vendors provide us with too many security settings ...
What I found, you need to enable both USB Debugging and USB debugging (security settings) , and disable MIUI Optimization (this is true for the Xiaomi provider, but you can check your device for similar parameters). Hope this helps.
source share