Directory:

  1. Release notes
  2. Question why
  3. The solution

I. Version description

Mac Android Studio: 3.6.2 "React ": "16.8.3"," React -native": "0.59.9"Copy the code

Second, the cause of the problem

2.1. After modifying the project code,Android StudioRun in, not updated after packaging

Solutions for referencehere

3.1. The reason is that8081The port is occupied.killall8081Port other procedures, and then re-run the project can be

  • Run this command in the project root directory
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 
Copy the code
  • ⚠️ If the project does not exist fileindex.android.bundle, solution referencehere

3.2. Re-run the project and you can successfully ✌️

react-native run-android
Copy the code
Write to oneself essay, have a question welcome to point outCopy the code