简体   繁体   中英

Compiling React Native for Windows (on Windows)

Has anyone successfully compiled and run a Windows (UWP) app on a Windows (10) machine using React Native?

I've built an app, it's working in the Android emulator. I ran through the instructions from Microsoft here and here .

I am using VS Code for my editor... should I be using Visual Studio?

I ran these commands to convert existing project to a 'Windows' project which adds the Windows file structure. That works.

npm install --save-dev rnpm-plugin-windows
react-native windows

I ran:

react-native run-windows

Which basically works but fails at the end.

At this point in the loading I get an error:

Building C:/Users/..../MyApp/windows/MyApp.sln
ERROR: The system was unable to find the specified registry key or value.

The rest of it seems to install fine but at the end...

Press Enter to continue...:
Failed to deploy: Command failed: CheckNetIsolation LoopbackExempt -a -n=

I Googled this error and got literally zero results. Anyone have something that could help me get over this hump?

Am I supposed to have a Windows Emulator on my machine like the Android emulator or does it just run like any other program?

Also, I'm not 'allowed' to create a new tag unless I have 1500 magic unicorn points so could someone please create react-native-windows tag for future users?

Solution:

CheckNetIsolation LoopbackExempt -a -n=MyApp

Where 'MyApp' is the name of your project folder.

Thanks @Onorio Catenacci for the link that had the clues to put it together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM