V
V
Vasya Nikolaev2017-06-13 12:41:13
Android
Vasya Nikolaev, 2017-06-13 12:41:13

How to run React Native test app on android emulator?

The sequence of actions was as follows:
npm install -g react-native-cli
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
Android Studio 2.3.2, Nexus 5x API_24 emulator.
After running on the emulator, I see this:
"Unable to load scripts from assets 'index.android.bundle' Make sure your bundle is packed correctly or you're running a packager server". Next comes a list of files with error lines. I just started learning react, tell me if anyone knows what is wrong.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alexnv, 2017-06-14
@alexnv

The content server that sends the application to the emulator did not start. It usually pops up in a separate window. Most likely a syntax error in the project

W
wcoder, 2017-06-21
@wcoder

https://github.com/facebook/react-native/issues/27...
in the console:
1. go to the project directory
2. react-native start
3. go to the browser localhost:8081/index.android.bundle ?platform=android
4. save the contents to the project directory "android/app/src/main/assets/index.android.bundle"
5. run run-android

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question