Session 'app' error while installing APK

后端 未结 30 1644
轻奢々
轻奢々 2020-11-28 03:30

I am having difficulty importing a project written on Android Studio 1.1 into Android Studio 2.1.2. I keep getting this error whenever the gradle is building before testing

相关标签:
30条回答
  • 2020-11-28 04:08

    Odd reasoning for me - I had deleted the project and pulled from repo. Because of this, the build/ files were missing.

    0 讨论(0)
  • 2020-11-28 04:09

    Very Simple. Follow this :

    Build -> Clean Project

    Then

    Build -> Rebuild Project.

    0 讨论(0)
  • 2020-11-28 04:09

    Looking at the error message, Android Studio tried to install older version of apk (lets say 0.5.1) while current version is lets say 0.5.2. Android Studio builds 0.5.2 but tries to install 0.5.1 for some reason.

    I have turned off Instant Run, invalidated and restarted, rebuilt project and didn't help.

    Solution worked for me is to uninstall the app, then change the current branch on VCS to some other branch. Then come again to latest branch and Rebuilt, Install the APK again.

    0 讨论(0)
  • 2020-11-28 04:11

    I was facing similar kind of problem.There is image of error attached.Error is highlighted in red. Turning off the Instant run removed error for Android Studio 2.3 and 3.1.4.

    0 讨论(0)
  • 2020-11-28 04:11

    In my case my device didn't have enough memory. After trying out a number of the suggestions here, I finally noticed the notification on my phone about low memory. The notification had been there for hours apparently.

    0 讨论(0)
  • 2020-11-28 04:12

    Follow this steps to overcome the issue.

    1. Disconnect all devices connected to System/Close all emulators running on System.
    2. Turn Off Instant Run feature from settings.
    3. Perform a clean build.
    4. Turn ON Instant Run feature from settings.
    5. Perform a clean build.
    6. Connect your device/start your Emulator and ensure it is online.
    7. Run the Project by selecting the device/emulator.

    NOTE:-

    1) You should not have different instances of Android Debug Bridge(adb) running on system.

    2) If using Genymotion then make sure that you use the custom sdk path mentioned in the Genymotion settings the which you mentioned in the settings of Android Studio.

    Follow all the steps and I am sure you will get the issue fix.

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