2022-12-28   ES  

1. Report error information content

I am running in Android Studio to start the error in the React-Native project Times

2, Chinese translation: cannot load the script. Please make sure you run the Metro server (running-native start ‘) or your software package’ index.android.bundle ‘is packed correctly for release.

2, the reason

Index.android.bundle does this file exist

In the editor, I searched this file and did not find it

3: Solution

Method 1:

1. In the project in Android/APP/SRC/main/Create folder Assets

2, execute commands in the project (the following is a line command, not two lines)

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

*Note: Check if you have the file of index.android.js. If there is an Enter command command, you will report an error, you will not find this index.android.js file; change the index.android.js to change it For index.js

After executing this command, a newETS folder will generate an index.android.bundle file under the new ASSETS folder

3, execute React-Native Run-Android in the project, successfully start

Method 2:

Perform React-Native Run-Android directly in the command line, do not use the RUN of WebStorm

Four, after successful start

Modify the content in the app.js to refresh the simulator to see if the modification is modified; the Android simulator RELOAD menu interface displays the shortcut key CTRL+M;


Related Posts

MATLAB (Fmincon): Warning: The matrix is close to the strange value, or the scaling error. The result may be inaccurate. RCond = 2.156571E-16.

JS how to operate the DOM rolling to the visible area? Dark

jQuery’s scrolllect and scrollTop method to slide method analysis

br a little change tangxiao


Random Posts

Use Ado+Access for database operation

front-end foundation-HTML

qt actual combat development-digital soft keyboard OSEAN

Webpage making a little bit

solution: The Following Packages Have Unmet Dependencies: GCC: DEPENDS: GCC (> = 7) But it is not goinging