question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: method does not override or implement a method from a supertype @Override

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19

github_iconTop GitHub Comments

20reactions
Mahaswamicommented, May 16, 2018

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:

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        configurations.all {
          resolutionStrategy {
            // START: RN version lockdown 
            force 'com.facebook.react:react-native:0.45.1'   //Your RN version should go here
            // END: RN version lockdown 
          }
        }
    }
}
9reactions
fearmearcommented, May 15, 2018

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.

subprojects {
    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.46.4'
        }
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

java - method does not override or implement a method from a ...
The problem is what the error message is saying: "the method does not override or implement a method from a supertype".
Read more >
error: method does not override or implement a ... - Treehouse
The problem here is the @Override annotation and the concept of inheritance. Just as we inherit genes from our parents, classes inherit fields ......
Read more >
method does not override or implement a meth - java help on ...
The Snake class must have a public void move() method. · The SnakeGame class must override the Game parent class's onTurn(int) method. ·...
Read more >
"method does not override or implement a method ... - Reddit
I'm trying to compile and it give the title erros, I've searched here and on the internet, and I'm not changing the access...
Read more >
method does not override or implement a method ... - GitHub
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...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found