react-native-device-info: method does not override or implement a method from a supertype @Override
i have updated react-native version from 0.44.0 to 0.48.1, after which i am unable to make a build. it is giving this error
myapp\node_modules\react-native-device-info\android\src\main\java\com\learnium\RNDeviceInfo\RNDeviceInfo.java:26: error: method does not override or implement a method from a supertype
@Override
^
1 error
:react-native-device-info:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-device-info:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 36
It is a known issue easy fixed.
It is due to a RN breaking change so just remove
@Override
inRNDeviceInfo.java
What is wrong:
replace with:
try
yarn upgrade react-native-device-info
It solved the issue for meSame for me, updated to RN 0.47.2
@angeloocana I’m gonna to open an issue on react-native page
Same error for RN 0.48.4 with react-native-device-info@0.10.2
I think the problem is that npm is pulling 0.10.2, but for RN 0.47+ we need 0.11+. The docs mention this, but maybe react-native-device-info should by default point to 0.11.0 instead. To fix it, I ran react-native unlink react-native-device-info && npm uninstall react-native-device-info, followed by npm install --save react-native-device-info@0.11.0 and finally react-native link react-native-device-info.
now I got this error for the first time… yesterday was ok… I’m using react-native 0.44
This fixed it for me: https://github.com/facebook/react-native/issues/19272#issuecomment-389321642
The solution in this issue solves the problem: https://github.com/facebook/react-native/issues/19259
@angeloocana for me isn’t just this library… but also other 5 libraries… I don’t know what happened…