After installing Android Studio 3.3, the "Select deployment target" toggles between no connected devices and a non-existing emulator.
Every time when trying to install the App on an emulator or a real device, it shows below error message:
02/01 18:05:26: Launching app
$ adb push /Users/jimclermonts/Documents/Android-Code/sources/app/build/outputs/apk/acceptance/debug/app-acceptance-debug.apk /data/local/tmp/nl.mycompanyname.acc
Device emulator-5556disconnected, monitoring stopped.
Error while Installing APK
Here is a video showing the strange toggling:
I tried killing it programmatically but it keeps booting itself:
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
emulator-5556 offline
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
emulator-5556 offline
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
Mac-van-Jim:~ jimclermonts$ adb -s emulator-5556 emu kill
Mac-van-Jim:~ jimclermonts$ adb -s emulator-5556 emu kill
Mac-van-Jim:~ jimclermonts$ adb -s emulator-5556 emu kill
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
Mac-van-Jim:~ jimclermonts$ adb devices
List of devices attached
emulator-5556 offline
it just keeps starting and stopping adb...
Update:
Deleted Android Studio 3.3,
Deleted these directories:
users/jimclermonts/library/Android users/jimclermonts/.android users/jimclermonts/.gradle users/jimclermonts/Library/Application Support/AndroidStudio3.3
Removed all Android emulators, Genymotion and .Genymobile directory as well.
Updated from High Sierra to Mojave, same problem.
Reverted back to AS 3.2.1 and added SDK. Same problem.
1. Create any Emulator configuration in Device Manager, start it, won't start and terminates immediately. 2. Uninstall Android Emulator tools from SDK Manager, re-install the same tools, create emulator configuration, start the same, won't start and terminates immediately.
You can ofcourse just run the application from the UI which will automatically install it. “To install an APK file on the emulated device, drag an APK file onto the emulator screen. An APK Installer dialog appears. When the installation completes, you can view the app in your apps list.
I have struggled with this from yesterday on my Mac. Port 5556 is taken by an other app and that causes a fake emulator to be shown (in my case it was Videostream app)
Solution (in terminal):
sudo lsof -i:5556
// or any other port that is shown as emulator name, you will get PID ps ax | grep [PID]
It gave me the file that used the port (it was one of the files in Videostream app) kill -QUIT [PID]
Have you tried killing adb and restarting it?
adb kill-server
then
adb start-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With