代码之家  ›  专栏  ›  技术社区  ›  yogihosting

无法在基于amd的pc上的emulator中运行react本机应用程序?

  •  1
  • yogihosting  · 技术社区  · 7 年前

    我正在努力 运行react native 在我的

    执行任务“:app:installDebug”失败。

    我在下图中显示了此错误: enter image description here

    我在跟踪 official document

    在正式文档中,单击名为 “使用 “本机代码” . 为了 开发操作系统:Windows 安卓

    注意:由于我的AMD处理器,我还没有安装 英特尔x86仿真器加速器HAXM

    enter image description here

    this stackoverflow应答,安装ABI调用 arm64-v80系列 在androidstudio中创建虚拟设备时使用android7.0nougat。我的虚拟设备已准备就绪,并且正在运行,请参见下图:

    enter image description here

    enter image description here

    我安装的SDK平台包括:

    enter image description here

    enter image description here

    我不知道怎么了?请帮忙???

    3 回复  |  直到 6 年前
        1
  •  2
  •   Florin Dobre    7 年前

    看来你的 react-native run-android 命令试图在API 24模拟器上运行应用程序,而您启动了API 25模拟器。

    检查所有API24依赖项并启动API24仿真器。应该有用。

    以下是在我的案例中有效的配置:

    enter image description here

    enter image description here

    • 从您的图片来看,模拟器尚未启动。检查模拟器是否真的启动了。

    • 如果你有RN0.57,确保你使用AndroidStudio 3.1.4而不是3.2.0。

    • 尝试添加api24deps并启动api25模拟器(据我所知,AVD可能需要一些来自旧API级别的deps)。

        2
  •  2
  •   Geng Jiawen    7 年前

    在pc机上,应该运行基于x86的仿真器。

        3
  •  1
  •   HedeH    7 年前

    尝试重新启动ADB服务器。您需要运行两个单独的命令:

    adb kill-server

    adb start-server -重新启动服务器。

    希望有帮助:)