When I try to launch the application on the phone through the Android studio, an error occurs:

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! Do you want to uninstall the existing application? 

Selecting any option OK / Cancel leads to completion. Here is the log:

 12:45 Gradle build finished in 15s 914ms 12:45 Executing tasks: [:app:assembleDebug] 12:45 Gradle build finished in 4s 986ms 12:46 Session 'app': Error Installing APKs 

Who has ideas how to fix? enter image description here

    3 answers 3

    Most likely there may be a problem in:

    1. It is necessary to disconnect in the studio "Instant Run". File> Settings> Build, Execution, Deployment> Instant Run
    2. You must enable debug mode on your phone.
    3. Delete the previous apk-shku from the phone.

      Step 1. Go to “Settings” → find “Developer Parameters” in the System and click.

      Step 2: TURN ON “Checking applications via USB” in the “Debug” section.

      Step 3. Try "Run the app" in Android Studio again!

       and you should also TURN ON following fields inside "Developer option" 

      1: ENABLE -> “Install via USB”

      If you use a Xiaomi phone, then the problem is solved a little differently.

      You can also just try to remove this application from your phone, and try to reinstall it through Android Studio

        Thanks to all! Help: Disable and re-enable the "USB debugging" mode on the phone.

        I just did not immediately write that the phone, like the studio, was overloaded several times and the application was deleted.