最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to run Android emulator from expo without running it in Android Studio? - Stack Overflow

programmeradmin5浏览0评论

I used Android Studio without any problems, but failed to upgrade my system from Fedora 40, and needed to install a fresh new Fedora 41 (Xfce flavor) and now I'm not able to run Emulator with expo (framework for React Native).

At first, I was not able to run emulator from Android Studio, but fixed the issue by setting SELinux to permissive mode (I think that I only need to set setsebool -P selinuxuser_execheap 1 because this was the error I was getting).

But the problem I now have is that I can't run Emulator without Android Studio.

Expo can find emulator only when it's running in Android Studio. When I close it I got error:

› Opening on Android... CommandError: No Android connected device found, and no emulators could be started automatically. Please connect a device or create an emulator (/workflow/android-studio-emulator). Then follow the instructions here to enable USB debugging: .html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory.

When I run emulator -list-avds I got no output, even that I have emulator in Android Studio.

I tried to run adb server before using expo, but it didn't solve the problem (it was fixing an issue with Ubuntu that I had long ago).

How to make expo and emulator see Android emulators (AVD) created in Android Studio?

I installed SDK from Android Studio that I've installed from Flatpack (after few attempts of using snap).

I know that I can just run Android Studio before running expo, but it's a better experience (DX) to having it in a floating window that can put next to the editor that I use. I don't want to use Android Studio for coding.

I used Android Studio without any problems, but failed to upgrade my system from Fedora 40, and needed to install a fresh new Fedora 41 (Xfce flavor) and now I'm not able to run Emulator with expo (framework for React Native).

At first, I was not able to run emulator from Android Studio, but fixed the issue by setting SELinux to permissive mode (I think that I only need to set setsebool -P selinuxuser_execheap 1 because this was the error I was getting).

But the problem I now have is that I can't run Emulator without Android Studio.

Expo can find emulator only when it's running in Android Studio. When I close it I got error:

› Opening on Android... CommandError: No Android connected device found, and no emulators could be started automatically. Please connect a device or create an emulator (https://docs.expo.dev/workflow/android-studio-emulator). Then follow the instructions here to enable USB debugging: https://developer.android/studio/run/device.html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory.

When I run emulator -list-avds I got no output, even that I have emulator in Android Studio.

I tried to run adb server before using expo, but it didn't solve the problem (it was fixing an issue with Ubuntu that I had long ago).

How to make expo and emulator see Android emulators (AVD) created in Android Studio?

I installed SDK from Android Studio that I've installed from Flatpack (after few attempts of using snap).

I know that I can just run Android Studio before running expo, but it's a better experience (DX) to having it in a floating window that can put next to the editor that I use. I don't want to use Android Studio for coding.

Share asked Mar 6 at 20:36 jcubicjcubic 66.8k58 gold badges249 silver badges455 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It seems that flatpack version of Android Studio have a different path to avd then SDK.

to make the emulator see the AVD you need to add environment variable:

export ANDROID_AVD_HOME=~/.var/app/com.google.AndroidStudio/config/.android/avd
发布评论

评论列表(0)

  1. 暂无评论