Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* What went wrong: Execution failed for task ':react-native-incall-manager:compileDebugJavaWithJavac'. #198

Open
TholapuGayathri opened this issue Jul 31, 2022 · 4 comments

Comments

@TholapuGayathri
Copy link

TholapuGayathri commented Jul 31, 2022

While Running react-native run-android It showing react-native-incall--manager:compile debug java with javac error

@tomobre
Copy link

tomobre commented Sep 7, 2022

Any updtes on this error?

@TholapuGayathri
Copy link
Author

TholapuGayathri commented Sep 14, 2022

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.

@KolissnikBogdan
Copy link

maybe here you can find answer: facebook/react-native#35210

@muhammad-kumail
Copy link

muhammad-kumail commented Mar 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants