Integrating react native code into the existing android project facing the following error.
Caused by: java.lang.IllegalAccessError: Method 'void androidx.core.net.ConnectivityManagerCompat.()
We are trying to add the react native project into an existing android app. With the following reference link:
https://medium.com/mindorks/react-native-integration-with-existing-app-f2757c2e672d
. While switching from Android Main activity to Reactnative activity, we get the following exception
Caused by: java.lang.IllegalAccessError: Method 'void androidx.core.net.ConnectivityManagerCompat.()' is inaccessible to class 'com.facebook.react.modules.netinfo.NetInfoModule' (declaration of 'com.facebook.react.modules.netinfo.NetInfoModule`
. Please suggest.