I am starting up an android virtual device, but I am getting:
Starting emulator for AVD 'avd.1' pulseaudio: pa_context_connect() failed pulseaudio: Reason: Connection refused pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver emulator: Listening for console connections on port: 5558 emulator: Serial number of this emulator (for ADB): emulator-5558
The emulator is coming up but I see no icons on it so I’m wondering if the errors listed above are “showstoppers”? Then when I try
adb install bin/my.apk I get the error
Can't find service: package. So it seems adb is not communicating with the AVD correctly. However,
adb devices does show emulator-5558 listed above. Any advice would be really helpful.
You have essentially answered your own question while asking it. The root of the problem is that the emulator is not setup properly (evidenced by the system UI not loading). When Android can’t boot properly, it is likely to fail to start some system services (in this case, the
The solution is to recreate the emulator, possibly with a different system image (in case the one you have been using is corrupt). If you are using an official image, try switching API levels, or switch from a GMS-enabled emulator image to a non-GMS image (or vice-versa).