2017-02-02 3 views
0

다음 명령을 실행했지만 index.android.bundle이 없습니다.어떻게 index.android.bundle을 얻을 수 있습니까?

react-native run-android 
react-native start 

http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false

이 나에게 패키지 번들을 제공되지는 무엇 JS. 그리고이 문제의 재고가 며칠 째 나는 도움을받을 수 없었습니다. 사전에

https://i.stack.imgur.com/tfmyM.png

감사 :

다음은 내 코드의 스크린 캐스트입니다!

답변

0

난 그냥 왜 내 발견 반응 네이티브 응용 프로그램은 파수꾼 때문에 번들 j를 구축하지 않고 이전 파수꾼을 제거한 후 새 watchman을 설치 중입니다. 올바르게 작동합니다.
다음 코드를 사용하십시오.

$ git clone https://github.com/facebook/watchman.git 
$ cd watchman/ 
$ git checkout v4.7.0 
$ sudo apt-get install -y autoconf automake build-essential python-dev 
$ ./autogen.sh 
$ ./configure 
$ make 
$ sudo make install 

$ watchman --version 
$ echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && watchman shutdown-server 
6

반응 네이티브 디버그를 위해 서버를 시작하는 스크린 샷.

디버그 모드의 앱은이 서버를 가리키며, 그러면 디버그 코드를 쉽게 변경할 수 있습니다.

안드로이드 :

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

IOS : 당신은 당신이이 명령을 사용할 수 있습니다 번들 파일을 패키지하려면

react-native bundle --platform ios --dev false --assets-dest ./ios --entry-file index.ios.js --bundle-output ios/main.jsbundle

+0

감사합니다. 그리고 나는 그것을 마침내 고쳤다. –

관련 문제