The react-native project was newly installed.
After that, react-native-webrtc was installed with yarn.
And I ran the android emulator with the yarn android
command.
Result is app crashed.
I just installed and set the permissions in AndroidManifest.xml file as below.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
So, I downloaded the example folder and installed.
The same phenomenon occurred when using yarn add react-native-webrtc
without using postinstall
.
So, when I postinstall again, it worked.
Can you check what’s wrong?
package.json
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-webrtc": "^1.87.2"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.17.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "16.13.1"
},
android emulator
- Android 10.0(Google Play) / Q
- Pixel 4 API 29