【发布时间】:2018-01-26 01:51:58
【问题描述】:
环境
react-native -v: 0.47.0
npm ls rnpm-plugin-windows: 0.47.0-RC5
npm ls react-native-windows: yes
node -v:8.2.1
npm -v:5.3.0
yarn --version:n/a
然后,指定:
Target Platform: UWP (developer mode enabled)
Target Platform Version(s):
10.0.10586
.NET 4.6.1, .NET 4.5
Target Device(s):
Mobile ARM
Development Operating System:
Windows 10 Desktop
Visual Studio Version:
Visual Studio 2015
Visual Studio 2017
复制步骤
- 初始化新的 react-native 项目(react-native init project_name)
- cd 到 project_name
- npm install rnpm-plugin-windows
- 反应原生窗口
- 打开视觉工作室
- 在 Visual Studio 中打开 .sln 文件
- 将设备连接到机器
- 更改 deviceServerHelper,cs 以指向机器的 ip 地址
- 在调试模式下运行指向设备和 ARM 架构的项目
- 应用程序在手机上启动并显示错误消息
- 在项目根目录的命令提示符下运行 react-native start to 启动打包器
- 显示重新加载 javascript 错误消息
预期行为
应用应该加载到显示 index.windows.js 页面内容的屏幕上
实际行为
提示无法下载 JS Bundle 的错误消息。
可重现的演示
(将链接粘贴到示例项目和重现问题的确切说明。) https://github.com/ballySingh/repo2.git
下载 zip 并运行 npm install。请按照上面复制部分的第 4 步操作。
【问题讨论】:
标签: react-native uwp windows-10-mobile mobile-development react-native-windows