I am getting error when i install my Android app in device Redmi 3s prime, and it is working on genymotion emulator
Solution 1
I found the answer for my question.
solution :- (1)
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
Connect your phone to your PC/Mac and on the phone authorize your computer
go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
solution :- (2)
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
Connect your phone to your PC/Mac and on the phone authorize your computer.
go back to Developer options, scroll down to find Install via USB
: and just turn on it.
Solution 2
Works !
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
Connect your phone to your PC/Mac and on the phone authorize your computer
go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
I solved my issue this way.
Solution 3
I'm using xiaomi redmi note 4x and after Turning on install via USB, Turning off MIUI optimization is the main objective from developer option to run app via USB! This works for me
Solution 4
I will suggest to check update of adb version. Aslo check the your Run Apps on a Hardware Device
For more information refer this solution ADB connection
Try above solutions. hope it will work
Solution 5
1 adb devices check your device is ok
2 reboot your devices
3 adb install -r F:\skylixwork\CollagePhoto\app\build\outputs\apk\app-debug.apk
Related videos on Youtube
Jaymin Bhadani
Updated on June 04, 2022Comments
-
Jaymin Bhadani almost 2 years
I'm having this error:
$ adb push F:\skylixwork\CollagePhoto\app\build\outputs\apk\app-debug.apk
/data/local/tmp/com.collagephoto java.io.IOException: An existing connection was forcibly closed by the remote host
Error while Installing APKInstallation failed with message
INSTALL_CANCELED_BY_USER
. 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!
Do you want to uninstall the existing application?
-
Raju over 7 yearsrestart your android studio Invalidate Caches / Restart
-
Jaymin Bhadani over 7 yearsthis is not working
-
petey almost 7 yearsPossible duplicate of Android Studio: Application Installation Failed
-
-
Jaymin Bhadani over 7 yearsno its not working for me error:- adb install -r F:\skylixwork\CollagePhoto\app\build\outputs\apk\app-debug.apk [100%] /data/local/tmp/app-debug.apk pkg: /data/local/tmp/app-debug.apk Failure [INSTALL_CANCELED_BY_USER]
-
skyfree about 7 yearsThanks! Turning off MIUI optimization is the key step!
-
Mohd. Shariq about 7 yearsWorked!! after disabling MIUI optimization. Thanks!