Android反应本机无法获得批量桥接

Byt*_*ode 8 android react-native

我试图运行我的第一个反应本机项目,但我收到错误

"无法获得批量桥接,请确保您的包裹正确捆绑"

请帮我解决它 - 使用Windows机器

Sha*_*ria 12

我遇到过同样的问题.按照以下步骤操作项目文件夹中的分辨率:

react-native start
Run Code Online (Sandbox Code Playgroud)

这可能需要一段时间.输出将如下所示:

Scanning 581 folders for symlinks in /home/shantanu/react-native/AwesomeProject/node_modules (5ms)
 ?????????????????????????????????????????????????????????????????????????????? 
 ?  Running packager on port 8081.                                            ? 
 ?                                                                            ? 
 ?  Keep this packager running while developing on any JS projects. Feel      ? 
 ?  free to close this tab and run your own packager instance if you          ? 
 ?  prefer.                                                                   ? 
 ?                                                                            ? 
 ?  https://github.com/facebook/react-native                                  ? 
 ?                                                                            ? 
 ?????????????????????????????????????????????????????????????????????????????? 
Looking for JS files in
   /home/shantanu/react-native/AwesomeProject 

[10/3/2016, 12:49:34 PM] <START> Building Dependency Graph
[10/3/2016, 12:49:34 PM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

[10/3/2016, 12:49:47 PM] <END>   Crawling File System (12440ms)
[10/3/2016, 12:49:47 PM] <START> Building in-memory fs for JavaScript
[10/3/2016, 12:49:47 PM] <END>   Building in-memory fs for JavaScript (123ms)
[10/3/2016, 12:49:47 PM] <START> Building in-memory fs for Assets
[10/3/2016, 12:49:47 PM] <END>   Building in-memory fs for Assets (90ms)
[10/3/2016, 12:49:47 PM] <START> Building Haste Map
[10/3/2016, 12:49:47 PM] <START> Building (deprecated) Asset Map
[10/3/2016, 12:49:47 PM] <END>   Building (deprecated) Asset Map (38ms)
[10/3/2016, 12:49:47 PM] <END>   Building Haste Map (773ms)
[10/3/2016, 12:49:47 PM] <END>   Building Dependency Graph (13551ms)
^[[B


[10/3/2016, 12:50:35 PM] <START> Requesting bundle: {"url":"/index.android.bundle?platform=android&dev=true&hot=false&minify=false"}
[10/3/2016, 12:50:35 PM] <START> Finding dependencies
transformed 636/636 (100%)
[10/3/2016, 12:50:45 PM] <END>   Finding dependencies (9503ms)
[10/3/2016, 12:50:48 PM] <END>   Requesting bundle: {"url":"/index.android.bundle?platform=android&dev=true&hot=false&minify=false"} (13130ms)
Run Code Online (Sandbox Code Playgroud)

一旦结束这个:

react-native run-android
Run Code Online (Sandbox Code Playgroud)

  • 我不明白为什么 React Native 教程中没有这个内容。如果没有“react-native start”,它对我不起作用。 (2认同)

elb*_*ita 5

在遵循入门教程和使用Visual Studio Emulator for Android 时,我在Windows机器中遇到了同样的问题.

在我的情况下,我发现它失败了,因为它在构建应用程序时找不到adb,所以我通过将Android SDK Platform Tools文件夹添加到PATH来解决它.检查你有它!:)