snapcrafters / android-studio

A community-maintained package to easily install Android Studio on Linux
https://developer.android.com/studio/index.html
47 stars 16 forks source link

Emulator without sound #62

Closed thetwom closed 3 years ago

thetwom commented 4 years ago

The emulator cannot connect to pulse audio on kubuntu 19.10. Currently I am using android-studio-canary, but the issue occurs also for android-studio. The error message, when starting the emulator is:

Emulator: pulseaudio: pa_context_connect() failed Emulator: pulseaudio: Reason: Connection refused Emulator: pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver

I can temporarily fix the issue when I call sudo ln -s /run/user/1000/pulse/native /run/user/1000/snap.android-studio-canary/pulse/ (source for this command: https://forum.snapcraft.io/t/spotify-does-not-play-audio/3266/31


I am running android-studio-canary version 3.6.0.9

CoWinkKeyDinkInc commented 4 years ago

I am also having this issue, only when I installed Android Studio using snap. This doesn't seem to be a problem with the Android emulator when I installed it from the tar on the Google website

om26er commented 4 years ago

@CoWinkKeyDinkInc Does that only happen with Canary build or are you facing the issue with android-studio snap as well ?

Also which Linux distro are you using ?

CoWinkKeyDinkInc commented 4 years ago

@om26er this happens with the regular build of Android studio. I am using Kubuntu 19.10 and I get the same errors. The audio on Spotify installed through snap works fine though.

Ortega-Dan commented 4 years ago

It also happens in Ubuntu and Manjaro to me ...

copiltembel commented 4 years ago

Facing the same problem with the tar version downloaded from Google. I'm running Ubuntu 18.04.4 LTS.

kroscek commented 4 years ago

It also happens in Ubuntu 20.04LTS using API Level 29. Started getting an error when I start the emulator

9:35 PM Emulator: pulseaudio: pa_context_connect() failed

9:35 PM Emulator: pulseaudio: Reason: Connection refused

9:35 PM Emulator: pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver

lewatt23 commented 4 years ago

@wa1618i please did you resolve it ?

svenoaks commented 4 years ago

I have the same problem as @wa1618i, with same versions. sudo ln -s run/user/1000/pulse/native /run/user/1000/snap.android-studio/pulse/ fixes it but only until the next kernel update apparently.

gosso22 commented 4 years ago

I have the same problem as @thetwom , I am running Android Studio 4.0 from Snap. I tried the suggested command but it didnt work for me. System Ubuntu 20.04

om26er commented 3 years ago

Should be fixed by https://github.com/snapcrafters/android-studio/pull/74

iainism commented 3 years ago

So far as I can tell I have this (or a similar issue) in Xubuntu still. No audio in emulator at all. So far as I can tell I have the latest snap:

$ snap refresh
All snaps up to date.

Attempting the temporary fix above doesn't work for me either:

$ sudo ln -s run/user/1000/pulse/native /run/user/1000/snap.android-studio/pulse/
ln: target '/run/user/1000/snap.android-studio/pulse/' is not a directory: No such file or directory
anyx commented 3 years ago

no sound still in emulator on my kde neon

$ sudo snap list
Name               Version                     Rev    Tracking       Publisher         Notes
android-studio     4.1.3.0                     101    latest/stable  snapcrafters      classic
fregate commented 2 years ago

android-studio 2020.3.1.22 114 latest/stable snapcrafters classic no sound and no 'run/user/1000/snap.android-studio/pulse/' Ubuntu 20.04

alariej commented 2 years ago

Same here!

android-studio 2020.3.1.24 snapcrafters no sound from emulator

lonejack commented 2 years ago

UBUNTU 18.04 LTS - same problem: no sound from emulator android-studio 2020.3.1.24 115 latest/stable snapcrafters classic androidsdk 1.1.2.0 49 latest/stable quasarrapp - flutter 0+git.671983f 111 latest/stable flutter-team✓ classic