Session 'app': Error Installing APK

前端 未结 29 1783
[愿得一人]
[愿得一人] 2020-12-01 02:23

Trying to install app on real device following instructions:- http://developer.android.com/tools/device.html. At end Android Studio giving error:

Session \'a         


        
相关标签:
29条回答
  • 2020-12-01 03:16

    I tried invalidating cache, deleting build folder and gradle sync. Also, I couldn't uninstall because the app is not visible on device. So I tried uninstalling through ADB and it worked.

    adb uninstall <package_name>
    
    0 讨论(0)
  • 2020-12-01 03:18

    You have to enable Developer options and enable USB Debugging:

    1. Go to the settings menu, and scroll down to "About phone." Tap it.
    2. Scroll down to the bottom again, where you see "Build number." (Your build number may vary from ours here.)
    3. Tap it seven (7) times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. (If only it were that simple, eh?) Keep on tapping, and poof, you've got the developer settings back.

    http://www.androidcentral.com/how-enable-developer-settings-android-42

    Inside Developer Options, enable USB Debugging

    0 讨论(0)
  • 2020-12-01 03:19

    My issue was solved by Clean --> ReBuild --> Run and in my case it was because i accidentally deleted the project folder and when i clicked ctrl+z to restore something wrong happened.

    0 讨论(0)
  • 2020-12-01 03:20

    Turning off the Instant run removed my error for Androdi Studio 2017.03.03 v2.3

    0 讨论(0)
  • 2020-12-01 03:21

    Edit:

    In newer Android Studio versions you can re-sync the project using this button:

    For older versions:

    Open Gradle window (on the right side in Android Studio) and click on the refresh button.

    However it is not a 100% sure fix.

    Solutions for other cases:

    Open terminal window and type "adb kill-server", then type "adb start-server". Usually after a few hours of inactivity, adb used to disconnect the device. (If you don't have the sdk/platform-tools in the PATH environment variable, then you should open a terminal in that folder)

    One tip if these solutions don't help you: If you open the Event Log window in the right bottom corner of Android Studio, you can see a detailed error message.

    Other edge case If you see this error: INSTALL_FAILED_INVALID_APK:... signatures are inconsistent. Then unfortunately a gradle refresh isn't enough, you have to go to Build -> Clean Project and then Run again.

    Issue with Android emulator If you want to deploy the APK to an Android Emulator and you see the "Error installing APK" message, your emulator may be frozen and need restart.

    0 讨论(0)
提交回复
热议问题