-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Method 'void android.support.v4.net.ConnectivityManagerCompat.<init>()' is inaccessible to class 'com.facebook.react.modules.netinfo.NetInfoModule #21200
Comments
Usually, this means that you need to update your support library. Before it should be updated in sdk manager, and now it is distributed on remote https://developer.android.com/topic/libraries/support-library/setup |
@hey99xx no this was using latest version of react-native in both |
In your stacktrace there's a class called |
the :+ in gradle file wasn't placing the latest react native version so i've to add it explicitly in the gradle file and everything worked fine after it |
Please help!! `apply plugin: 'com.android.application' dependencies {
}` and this is the crash im getting: |
me too |
Environment
Run
react-native info
in your terminal and paste its contents here.React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
Memory: 1.15 GB / 7.64 GB
Binaries:
Yarn: 1.9.4 -..\npm\yarn.CMD
npm: 6.2.0 - ..\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4907809
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
I'm trying to integrate an react native compoentn into an existing android app following this http://facebook.github.io/react-native/docs/integration-with-existing-apps and i've done same steps and i got this error
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.net.ConnectivityManagerCompat.()' is inaccessible to class 'com.facebook.react.modules.netinfo.NetInfoModule' (declaration of 'com.facebook.react.modules.netinfo.NetInfoModule' appears in /data/app/com.dashboard.myapp-kVuiEi_aGz4O9Va5MDTWfQ==/base.apk)
at com.facebook.react.modules.netinfo.NetInfoModule.(NetInfoModule.java:55)
at com.facebook.react.shell.MainReactPackage.createNativeModules(MainReactPackage.java:67)
at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:793)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:730)
at com.facebook.react.ReactInstanceManagerImpl.access$600(ReactInstanceManagerImpl.java:91)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:184)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:169)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Reproducible Demo
http://facebook.github.io/react-native/docs/integration-with-existing-apps
following the above link in order to make demo of how to call react native component inside a native app (android)
The text was updated successfully, but these errors were encountered: