I try to install app via adb and get a error:
$ ./adb -d install /Users/dimon/Projects/one-place/myprogram/platforms/android/build/outputs/apk/android-debug.
Turn off Miui Optimizations on Developer Settings, then Restart the phone. it worked for me. Settings > Additional Settings > Developer Options > MIUI Optimization
Im using Xiaomi Redmi Prime 3S, Non of the above method worked for me. This frustrated me
what i tried was, i signed out from Mi Account and then created new account. tada... after that i can enable USB Debugging. Hope this helps.
This is my case (using react-native) I press Ctr+C to interrupt while installing and after that this error occured. - solution:
cd android
./gradlew clean
In MIUI 8 go to Developer Settings and toggle "Install over USB" to enable it.
For Redmi and Mi devices turn off MIUI Optimization
Settings > Additional Settings > Developer Options > MIUI Optimization
Faced the same Issue in MI devices and figured out the problem by following these Steps :
1) Go to Setting
2) Click on Additional Settings
3) Click on Developer Options
4) Click toggle of Install via USB to enable it
and the issue will be resolved.