Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法将Android emulator连接到本机调试器_Android_React Native_Android Emulator_React Native Android - Fatal编程技术网

无法将Android emulator连接到本机调试器

无法将Android emulator连接到本机调试器,android,react-native,android-emulator,react-native-android,Android,React Native,Android Emulator,React Native Android,我无法将android emulator与react本机调试器连接 当我运行react native run android时,它会成功地启动应用程序,而不会显示任何错误。它还带来了节点城域绑定器。但它没有在RN调试器中打印任何日志。当我按下页面上的重新加载应用程序时,它显示以下弹出错误: 反应本机:未连接任何应用程序 向所有React本机应用发送“重新加载”失败。确保你的应用程序正在模拟器或手机上运行 我试着运行这个adb反向tcp:8081 tcp:8081,但它不起作用。当我在模拟器中按

我无法将android emulator与react本机调试器连接

当我运行
react native run android
时,它会成功地启动应用程序,而不会显示任何错误。它还带来了节点城域绑定器。但它没有在RN调试器中打印任何日志。当我按下页面上的重新加载应用程序时,它显示以下弹出错误:

反应本机:未连接任何应用程序
向所有React本机应用发送“重新加载”失败。确保你的应用程序正在模拟器或手机上运行

我试着运行这个
adb反向tcp:8081 tcp:8081
,但它不起作用。当我在模拟器中按Cmd+m时,它显示多点触摸。所以我也不能打开开发者菜单


如何解决这个问题?

Emulator是指真正的设备还是Android studio

如果您试图从android studio连接emulator,请卸载设备并安装Pixel 2,它可能会对您有所帮助


然后卸载React本机调试器并安装最新的调试器。问题是,在我的RN版本从0.59更新到0.6后,页面加载不正确。我相信它还有一些其他问题,因为我从一开始就没有在android上测试过。因此,我刚刚创建了一个新项目,并手动导入了所有文件。可能不是您正在寻找的答案,但这解决了问题。

是否在emulator上启用了调试模式?我无法打开调试器,因为页面加载不正确。我添加了相同的问题,但在我的情况下,只需重新激活emulator上的internet连接即可。
System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 60.96 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    npm: 6.12.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: ^0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1