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

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

问题描述

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

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 :

无法在Android上启动项目:运行adb时出错:没有Android 找到设备.请连接设备并按照此处的说明进行操作 启用USB调试: https://developer.android.com/studio/run/device .html#developer-device-options . 如果您使用的是Genymotion,请转到设置"->"ADB",然后选择使用自定义 Android SDK工具",然后将其指向您的Android SDK目录.

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.

我只想在没有USB的情况下在我的PC中看到仿真器.我有一部iPhone,但是使用Expo Scan条形码时,它只是显示在手机中,而不是显示在PC中.我不想这样做,因为在我看来调试不方便.我在PC中使用Windows,因此无法将iOS用于仿真器.

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.

如何在Windows上运行EXPO Android模拟器?

推荐答案

是的,您可以:-(使用零Android Studio配置)

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

  1. 全局安装expo-cli.
  2. 安装android Studio.
  3. 通过运行expo-cli init创建项目
  4. 无需在android Studio上进行任何配置.
  5. 从android studio打开现有项目

  1. 然后打开创建的expo项目,它将作为带有以下内容的android项目可用 上面有android徽标
  2. 然后打开AVD管理器

  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

下载并安装所需的任何设备,但请参见android N上方的内容 并为x86做

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

  1. 在运行项目之前运行模拟器
  2. 然后运行expo开始启动项目
  3. 转到都会生成器并说运行android

  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

如果它不是第一次运行或遇到错误,请关闭项目 从最近的模拟器中获取,然后从Metro再次在android上运行

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. 然后它应该可以工作

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

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