[RN Error] java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
ERROR:
java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
SOLVE:
- [패키지명]/android/app/src/main/assets 폴더가 있는지 확인하고 없으면 생성
2. [패키지명]/android 폴더에서 ./gradlew clean 실행
- [패키지명] 폴더에서 아래 명령어 실행
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
4. react-native run-android
Ref:
https://dlevelb.tistory.com/1142
https://mant81.tistory.com/226
Author And Source
이 문제에 관하여([RN Error] java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@hyeseon405/RN-Error-java.lang.RuntimeException-Unable-to-load-script.-Make-sure-youre-either-running-Metro-run-react-native-start-or-that-your-bundle-index.android.bundle-is-packaged-correctly-for-release저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)