无法获取BatchBridge,请确保您的软件包已正确打包 [英] Could not get BatchBridge, make sure your bundle is packaged correctly

查看:512
本文介绍了无法获取BatchBridge,请确保您的软件包已正确打包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行我创建的反应性应用程序。当我最初在手机中运行时,我得到了下面的屏幕。





我尝试运行反应本地开始,当我运行它时,我得到以下输出。





当在初始化包管理器中停止时,我在另一个终端中运行了react-native run-android。仍然我得到相同的BatchBridge错误。当我点击错误屏幕上的刷新按钮,我得到以下屏幕。





我在这里做错什么?在我的代码中,我只有一个console.log。只是一个开始的新项目。任何意见将不胜感激。我试过参考错误的答案无法获得BatchedBridge,确保您的包已正确打包在应用但它的一个Linux命令集的开始。


解决方案

如果您运行的是Android 5.0以上版本,请运行在命令提示下面连接到开发服务器:

  ADB反向TCP:8081的TCP:8081 

然后,从通过摇动装置中的显影剂菜单中选择 '重新加载JS'。



'p>如果上述步骤不工作,或者你正在运行的Android版本较低,请尝试以下通过Wi-Fi连接:




    'LI>访问开发者菜单,进入 '开发设置'。
  1. 选择 '调试服务器主机设备'。

  2. 输入您的机器IP地址和端口例如10.0.0.1:8081

  3. 尝试通过从开发菜单中选择重新加载JS再次重新加载应用程序。


  4. I am trying to run a react-native app I have created. I am getting the below screen when I run it initially in my phone.

    I tried running the "react-native start" and when I run it I get the below output.

    While it stops at "Initializing package manager" I ran the "react-native run-android" in another terminal. Still I get the same BatchBridge error. When I click on the refresh button on the error screen I get the below screen.

    What am I doing wrong here? In my code, I only have a console.log. Just a new project to get started. Any advice would be much appreciated. I tried referring to the answer of error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app but its a Linux set of commands.

    解决方案

    If you are running Android 5.0+, please run the following in a command prompt to connect to the development server:

    adb reverse tcp:8081 tcp:8081
    

    Then, select 'Reload JS' from the Developer menu by shaking the device.

    If the above steps are not working or you are running a lower version of Android, please try the following to connect via Wi-Fi:

    1. Access the Developer menu, go to the 'Dev Settings'.
    2. Select 'Debug server host for device'.
    3. Type in your machine IP address and port e.g. 10.0.0.1:8081
    4. Try reload the app again by selecting 'Reload JS' from the Developer menu.

    这篇关于无法获取BatchBridge,请确保您的软件包已正确打包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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