react-native: error: method does not override or implement a method from a supertype @Override
- I have reviewed the documentation
- I have searched existing issues
- I am using the react-native-cli: 2.0.1 react-native: 0.44.3
Environment
After running react-native info
i got Unrecognized command 'info'
.
Steps to Reproduce
run react-native run-android
Expected Behavior
Should compile android
Actual Behavior
This morning I got this error after running react-native run-android
I got this error
node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java:61: error: method does not override or implement a method from a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/manuela/robonica/roboapp/node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/Utility.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:react-native-fbsdk:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-fbsdk:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 22.481 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I’m getting this error with a lot of libraries, so the problem is not just this library, but something changes on React-native i think.
Also I notice this
Download https://jcenter.bintray.com/com/facebook/react/react-native/0.55.3/react-native-0.55.3.pom
Download https://jcenter.bintray.com/com/facebook/fresco/fresco/1.3.0/fresco-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1.3.0/imagepipeline-okhttp3-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/drawee/1.3.0/drawee-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/1.3.0/fbcore-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/1.3.0/imagepipeline-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-base/1.3.0/imagepipeline-base-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/1.3.0/fbcore-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/drawee/1.3.0/drawee-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-base/1.3.0/imagepipeline-base-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/1.3.0/imagepipeline-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/fresco/1.3.0/fresco-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1.3.0/imagepipeline-okhttp3-1.3.0.aar
Download https://jcenter.bintray.com/com/facebook/react/react-native/0.55.3/react-native-0.55.3.aar
Incremental java compilation is an incubating feature.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
Why is downloading react-native 0.55.3 pom files?
Thx
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19
In our case react-native-audio plugin brought 0.55.3 dependency and caused this havoc.
Here is how we locked down our RN version across all modules. Edit the android/build.gradle file and make the following changes:
Hey, I figured out how to lock down transitive dependencies for such projects. Add this to root youappname.gradle file. Don’t forget to change the version.
These fixes don’t seem to be working for me anymore:
or
compile ("com.facebook.react:react-native:0.44.2") { force = true }
I get the following error:
Can be put a priority 1 on this issue.
yarn add react-native Fixed this issue for me!😃
[EDIT] @kelset commented exactly the same as I am explaining below in bug #19259 [EDIT]
First of all I’m sorry but English is not my native language. I think I’ve found what’s causing this problem.
The problem is occurring because react-native has been updated at http://jcenter.bintray.com/com/facebook/react/react-native/. This update was published on 2018-05-15 08:41:47 as can be seen in the image below.
Due to this update the project no longer uses the version contained in the ‘node_modules’ folder and uses the last version existing in the site.
The strange thing is that the ‘0.49.5’ and ‘0.55.3’ versions are listed at http://jcenter.bintray.com/com/facebook/react/react-native/ but are not listed in https://bintray.com/bintray/jcenter/com.facebook.react:react-native. Is this right?
@thebergamo You have to lock down RN version for every affected package, not just your app. I got 5 of them on current project. Ideally every package has to read RN version from gradle.properties. Is there a better solution?
The solution in this issue solves the problem: https://github.com/facebook/react-native/issues/19259