Session 'app' error while installing APK

后端 未结 30 1764
轻奢々
轻奢々 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:21

    None of the above worked for me, the simplest solution was to go to

    File > invalidate caches/restart > invalidate and restart

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

    This issue seems to be bug in Android Studio.

    I tried all other workarounds but the issue was appearing randomly.

    I also have custom named apk for output. But Android studio was randomly picking custom apk name and default apk name.

    Adding Gradle-aware Make solved the issue.

    Following are the steps.

    1. Menu Run -> Edit Configuration

    2. Select "app" configuration

    3. Add Gradle-aware Make to Before Launch actions

    You are done.

    Following article helped me in finding the solution https://android.jlelse.eu/android-studio-3-1-how-to-fix-it-b49f72eb054f

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

    This error happens due to Gradle not synced with the project. go to Tools- Android- Sync Project with Gradle files. Then Run it again. On newer Android Studio versions, go to File-> Sync project with gradle files

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

    I was facing same problem.Tried every think mentioned here in blog.

    But it was basic error to permit device "allow installing app from USB" which did it for me.

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

    I was able to resolve it simply by opening the notification bar of the android phone , clicking on "tap for more options" and selecting PTP

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

    I had similar problem. In my device I have two accounts and the app was remained installed in another account. I have deleted app from both of the accounts and it was done.

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