I am getting error when i install my Android app in device Redmi 3s prime, and it is working on genymotion emulator

15,493

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.

enter image description here

Solution 2

Works !

  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.

  2. Go back to Settings, Additional settings, Developer options and enable USB Debugging.

  3. Connect your phone to your PC/Mac and on the phone authorize your computer

  4. go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted

  5. 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

Share:
15,493

Related videos on Youtube

Jaymin Bhadani
Author by

Jaymin Bhadani

Updated on June 04, 2022

Comments

  • Jaymin Bhadani
    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 APK

    Installation 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?

  • Jaymin Bhadani
    Jaymin Bhadani over 7 years
    no its not working for me error:- adb install -r F:\skylixwork\CollagePhoto\app\build\outputs\apk\app-debug.a‌​pk [100%] /data/local/tmp/app-debug.apk pkg: /data/local/tmp/app-debug.apk Failure [INSTALL_CANCELED_BY_USER]
  • skyfree
    skyfree about 7 years
    Thanks! Turning off MIUI optimization is the key step!
  • Mohd. Shariq
    Mohd. Shariq about 7 years
    Worked!! after disabling MIUI optimization. Thanks!