问题
I am getting an error message while trying to run an apk through android studio 3.4.1
Installation failed with message Failed to create install session with 'cmd package install-create -r -t -S 1647504'. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
i have tried cleaning the project, rebuilding the project and unchecking the instant run option as well, none of them seems to have worked
回答1:
The below is the solution that worked for me:
- In Android Studio go to Tools -> AVD Manager.
- Choose a device, you are trying to deploy APK on, expand actions with a down-facing triangle and wipe data from Emulator.
回答2:
I got the same message while there is a physical device connected to my Android studio, when I check the logs then I got to know that it was due to my phone's full memory.Once I deleted some stuff I was able to install the app properly.
回答3:
It's been a year but I just had the same issue and I found this other solution that works for me: Source to solution with images
- Click on the arrow at the right of where it says app in the center top of the screen
- Click on edit configurations
- In the bottom part of the new window, click the + icon where it says "Before launch: Gradle-aware Make" and select the option "Gradle-aware Make"
- In the pop up window write :app:installDebug and click OK
- Click OK again in the previous window and try to install the app, I hope it works
来源:https://stackoverflow.com/questions/57374314/installation-failed-with-message-failed-to-create-install-session-with-cmd-pack