Open TholapuGayathri opened 2 years ago
Any updtes on this error?
Any updtes on this error?
Yes I found solution..
delete node modules -----> rm -rf node_modules/ delete package-lock.json --------> rm -rf package-lock.json Again install node modules by---------> npm install --force Then run the app by ---------> npx react-native run-android
It will work.
maybe here you can find answer: https://github.com/facebook/react-native/issues/35210
I ended up making some patches in package using patch-package. Actually the issue lies in my case at Build.VERSION_CODES.TIRAMISU & Context.RECEIVER_NOT_EXPORTED line of code in package files AppRTCBluetoothManager.java & InCallManagerModule.java, throwing error: cannot find symbols Build.VERSION_CODES.TIRAMISU, Context.RECEIVER_NOT_EXPORTED on build. i update the code in both files.
node_modules/react-native-incall-manager/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java
protected void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- apprtcContext.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED);
- } else {
- apprtcContext.registerReceiver(receiver, filter);
- }
+ apprtcContext.registerReceiver(receiver, filter);
}
and
node_modules/react-native-incall-manager/android/src/main/java/com/zxcpoiu/incallmanager/InCallManagerModule.java
private void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
- final ReactContext reactContext = getReactApplicationContext();
- if (reactContext != null) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- reactContext.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED);
- } else {
- reactContext.registerReceiver(receiver, filter);
- }
- } else {
- Log.d(TAG, "registerReceiver() reactContext is null");
- }
+ getReactApplicationContext().registerReceiver(receiver, filter);
}
yarn android & app build successfully
While Running react-native run-android It showing react-native-incall--manager:compile debug java with javac error