2

我正在尝试为 Android 4.1.2 构建一个 react-native 应用程序

我编译应用程序 OK,然后得到一个带有“无法获取本机呼叫队列”消息的红屏。

在建议的解决方案中:使用 adb reverse tcp:8081 tcp:8081 两次获得“关闭端口错误”。由于 adb reverse 仅在 Android 5 中有效,我怎样才能使其正常工作?

其他问题:是否可以拔掉手机并离开服务器调试 wifi 覆盖范围以在街上测试应用程序?(我想在科尔多瓦我们可以)

感谢您的回复。

4

1 回答 1

1
  1. 创建目录:mkdir android/app/src/main/assets

  2. 创建index.android.js一个克隆 index.js 的文件:cp index.js index.android.js

  3. react-native link

  4. curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

  5. react-native run-android

于 2018-07-01T15:06:39.807 回答