Update time: 2022-06-16
Here is a supplementary description of the relevant content, if other topics do not find relevant content, you can refer to this document.
# Download with subprojects.
git clone --recurse-submodules [email protected]:easemob/react-native-chat-sdk.git
# Initialize subprojects (if the Clone main project does not include subprojects).
git submodule update --init --recursive
git submodule foreach "git checkout dev"
npx react-native doctor
or
npx react-native info
# review tcp port list
adb reverse --list
# review android devices list
adb devices --list
# you can run watch mode to automatically rebuild the changes
yarn watch
# fix watchman question
$ watchman watch-del-all
# make sure your code passes TypeScript and ESLint. Run the following to verify:
$ yarn typescript
$ yarn lint
# fix formatting errors, run the following
$ yarn lint --fix
# clean watchman for ios
watchman watch-del-all
rm -rf node_modules
yarn install
rm -rf /tmp/metro-*
# Show the development menu
# ios emulator `command` + `D`
# android emulator`command` + `M`
# shake your phone
# Display box window
# LogBox
import { LogBox } from 'react-native';
# Ignore log notification by message:
LogBox.ignoreLogs(['Warning: ...']);
# Ignore all log notifications:
LogBox.ignoreAllLogs();
# browser debugging
# or install react-devtools debugging
$ npm install -g react-devtools
-
Use vscode to debug the necessary plug-ins. vscode plugin
React Native Tools
https://github.com/microsoft/vscode-react-native
-
Could not find entry function problem. add file
example/index.js
, original fileexample/index.tsx
-
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
udpate gradle version. 3.5.3 to 4.2.2 -
Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')
The Flipper version is too low. 0.80.0 to 0.142.0 -
Android debugging could not find the service.
- The phone is not properly connected to the computer.
- You need your phone and your computer on the same network.
- For versions 5.0 or later, data forwarding is required:
adb reverse tcp:8081 tcp:8081
-
watchman watch-del '/Users/asterisk/Codes/rn/react-native-chat-sdk' ; watchman watch-project '/Users/asterisk/Codes/rn/react-native-chat-sdk'
watchman watch-del-all
-
editorconfig 影响第三方代码格式
-
Iso real machine debugging using vscode.
brew install ios-deploy
npx react-native run-ios --device "xxx's iPhone"
react native website
react native website cn
brew install node
npm install -g yarn
npm install -g react-native-cli