Here is my first issue with Android Studio. I'm starting to learn Kotlin, I was following a tutorial, but then I decided to start again with a template, so after start a template I got this error when I tried to launch the emulator. I have no idea why is happening that.
10/17 23:24:34: Launching 'app' on Nexus 6P API 27.
Installation did not succeed.
The application could not be installed.
Installation failed due to: ''cmd package install-create -r -t -S 2918030' returns error 'Unknown failure: cmd: Can't find service: package''
Retry
If I start the emulation in the cold boot option, there is no issue. I would like to start it in the quick boot mode.
Related
I'm working on an Android App in Android Studio.
After updating Android Studio to Bumblebee 2021.1.1 Patch 2 it has stopped working.
Now I get the following error:
Installation did not succeed.
The application could not be installed.
List of apks:
[0] 'D:\Filer\Dokument\...\app\build\intermediates\apk\debug\app-debug.apk'
Installation failed due to: ''cmd package install-create -r -t --user current --full --dont-kill -S 4617721' returns error 'Unknown failure: cmd: Can't find service: package''
Retry
Failed to launch an application on all devices
Any ideas how to solve this?
The problem is most likely with the Android Emulator in Android Studio.
If you do a Cold Reboot of the Android Emulator it will most likely solve your problem.
Open the Android Studio Device Manager from Tools -> Device Manager.
Close the Android Emulator if still running.
Click on the Android Emulator's Device Menu ▼ located on the right hand side in the Device Mananger and Choose Cold Boot Now.
Now, try to run the app again...
How to fix ("cmd package install-create -r -t -S 1699739' returns error 'Unknown failure: cmd: Can't find service: package") error when i launch the emulator.
'cmd package install-create -r -t -S 1699739' returns error 'Unknown failure: cmd: Can't find service: package'
20:20 Session 'app': Install failed.
Installation failed
Rerun
It's not your fault. The problem is with the functionality of emulator .
SO,
Close the Emulator.
Go to AVD manager and edit virtual device Quick Boot to Cold Boot.
Try the following steps:
Close the emulator
Cold boot app
Clean Build
Open emulator
Run app
1- Close your emulator
2- Go to AVD Manager
3- Click the down arrow next to your emulator -> cold boot now
I had same problem. This is what I did.
Force quit the emulator.
Go to Android Studio, Click on AVD Manager.
In the action column (last column), click the arrow facing down.
Click Cold Boot Now.
Run code from Android Studio again. Things should run normally.
Usually, this happened because the emulator freeze due to the laptop goes to sleep for a long time.
I would suggest you to run the app again. I was also having the similar problem but when i run the app again, the issues got fixed. If it doesn't solve the problem then create a new adv and start launching your app on it.
Do check once if there are multiple instances of emulator running. I got this error when I had 2 instances of emulator running.
Go To AVD Manager on Android studio
Select the Edit option
Select Boot Option as "Cold Boot"
Launch the Emulator
This should fix your problem
I just updated my Android Studio to version 3.5. When I run App using my phone, it successfully compiles, but an error occurs during the installation process.
Error :
Launching 'app' on Xiaomi Redmi Note 4.
Installation did not succeed.
The application could not be installed.
Installation failed due to:''pm install-create -r -t -S 4654636' returns error 'UNSUPPORTED'
I solved this problem by disabling MIUI optimization from developed options:
Settings - Developer options - MIUI optimization
Disable it and it will ask to reboot the device, after that the app can be installed
How to fix ("cmd package install-create -r -t -S 1699739' returns error 'Unknown failure: cmd: Can't find service: package") error when i launch the emulator.
'cmd package install-create -r -t -S 1699739' returns error 'Unknown failure: cmd: Can't find service: package'
20:20 Session 'app': Install failed.
Installation failed
Rerun
It's not your fault. The problem is with the functionality of emulator .
SO,
Close the Emulator.
Go to AVD manager and edit virtual device Quick Boot to Cold Boot.
Try the following steps:
Close the emulator
Cold boot app
Clean Build
Open emulator
Run app
1- Close your emulator
2- Go to AVD Manager
3- Click the down arrow next to your emulator -> cold boot now
I had same problem. This is what I did.
Force quit the emulator.
Go to Android Studio, Click on AVD Manager.
In the action column (last column), click the arrow facing down.
Click Cold Boot Now.
Run code from Android Studio again. Things should run normally.
Usually, this happened because the emulator freeze due to the laptop goes to sleep for a long time.
I would suggest you to run the app again. I was also having the similar problem but when i run the app again, the issues got fixed. If it doesn't solve the problem then create a new adv and start launching your app on it.
Do check once if there are multiple instances of emulator running. I got this error when I had 2 instances of emulator running.
Go To AVD Manager on Android studio
Select the Edit option
Select Boot Option as "Cold Boot"
Launch the Emulator
This should fix your problem
Sometimes when I go to build and test my apps I get this error and it drives me off the wall. I never had to deal with this before.
Installation Failure
com.android.ddmlib.InstallException: 'cmd package install-create -r -t --full -S 2816556' returns error 'Unknown failure: cmd: Can't find service: package'
I tried following this guide here
Application Installation Failed in Android Studio
I did all the suggestions disable instant run, build apk then rebuild app, restart computer, restart android studio, use different virtual device.
Idk anymore any ideas? I am using Android Studio 3.4.1
Update: Fixed it my issue sorta. If i first launch my virtual device and get it loaded. Then run my app the error doesn't pop up. This leads me to believe that Android Studio will throw the installation error because it can't run the app on the virtual device since it takes forever to load on my laptop