react-native - Expo无法连接到android-studio模拟器(Ubuntu 20.04)
问题描述
当我运行“npm start”然后运行“a”/“sudo expo start --android”时,与 android 模拟器的连接失败。我得到的错误是:
Couldn't start project on Android: Error running adb: No Android connected device found, and no emulators could be started automatically.
Please connect a device or create an emulator (https://docs.expo.io/workflow/android-studio-emulator).
Then follow the instructions here to enable USB debugging:
https://developer.android.com/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.
在尝试调试时,我发现:
该应用程序正在网络浏览器上运行
在 android-studio 上的模拟器上启动 AVD 时,我得到了 android studio 事件:
Emulator: E0810 10:41:04.480101550 89662 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1597045264.480085451","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
我确保 .bashrc 包含正确的 SDK 路径:“export ANDROID_SDK=/home/user/Android/Sdk”,并点击此链接
我会提到模拟器已经运行了我的应用程序,我不确定是什么改变了配置并使应用程序无法在 android-studio 模拟器上运行。我重新安装了 android-studio 但它仍然没有连接
解决方案
推荐阅读
- java - 随帧大小缩放形状
- python - 在python中识别事件数据中序列的更有效方法
- python - 如何从未处理的文本/数据中提取人的年龄和性别?
- firebase-authentication - 如何设置 Firebase 身份验证以保护我的 .Net Core API
- audio - 任何非基于 Chromium 的网络浏览器都无法加载某些 H264-mp4 视频
- html - 如何通过单击包含用户名的标签在 Angular 中打开一个新组件?
- html - net::ERR_NAME_NOT_RESOLVED,尝试通过 Chrome 或 Firefox 上的 HTML 链接获取谷歌字体时不允许错误的 URI 或跨站点访问
- python - 如何在不同时间调用python中的函数?
- java - JavaFX:从 FileChooser 获取图像并将其保存在一个字节 []
- wordpress - 为什么我的所有代码块都添加了水平滚动条?