Expo在使用Windows 10的android模拟器上运行 [英] Expo run on android emulator using windows 10

查看:31
本文介绍了Expo在使用Windows 10的android模拟器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在没有安卓手机的情况下运行安卓模拟器吗?我已经安装了 android studio,并且已经安装了 android 虚拟设备.但是,当我尝试运行它时,它会出现这样的错误:

<块引用>

无法在 Android 上启动项目:运行 adb 时出错:没有 Android找到设备.请连接设备并按照此处的说明进行操作启用 USB 调试:

  1. 然后打开创建的 expo 项目,它将作为一个带有上面有安卓标志
  2. 然后打开 AVD 管理器

  3. 下载并安装您想要的任何设备,但请注意其高于 android N并为 x86 做这件事

  4. 安装所需的模拟器后

  1. 在运行项目之前运行模拟器
  2. 然后运行 ​​expo start 启动项目
  3. 去 Metro builder 说运行 android

  4. 如果它在第一次运行时没有运行或者如果你收到错误关闭项目来自最近的模拟器并从地铁再次在 android 上运行生成器不要关闭项目,而只是关闭模拟器上最近正在运行的项目

  1. 那么它应该可以工作

Can I run android emulator without an android phone? I have installed android studio and I've already installed android virtual device. However, when I try to run it, it gives an error like this :

Couldn't start project on Android: Error running adb: No Android device found. Please connect a device and 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.

I just want to see the emulator in my pc without usb. I have an iPhone but it just shows up in my phone not in my pc using expo scan barcode. I don't want to do that because in my opinion it's not comfortable for debugging etc. I am using windows in my pc so I can't use iOS for emulator.

how to run expo android emulator on windows?

解决方案

Yes you can:-(With zero android studio config)

  1. Install expo-cli globally.
  2. Install android Studio.
  3. Create a project by running expo-cli init
  4. No need of any configuration on android Studio.
  5. Open existing Project from android studio

  1. then Open the created expo Project it will be available as an android project with a android logo on it
  2. then open the AVD Manager

  3. Download and install whichever device you want but see to that its above android N and do it for x86

  4. after Installing the desired emulator

  1. run the emulator before running the project
  2. then run expo start to start the Project
  3. Go to the metro builder and say run android

  4. if it doesn't run on the first go or if you get error close the project from emulator from recents and do a run on android again from metro builder don't close project just the running project from recent on emulator

  1. then it should work

这篇关于Expo在使用Windows 10的android模拟器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆