Skip to content
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

@Override for createJSModules() causes build error with RN 4.8 #5

Closed
burdiuz opened this issue Oct 2, 2017 · 5 comments
Closed

@Override for createJSModules() causes build error with RN 4.8 #5

burdiuz opened this issue Oct 2, 2017 · 5 comments

Comments

@burdiuz
Copy link

burdiuz commented Oct 2, 2017

Hi!

I was trying to compile project with this library and got an error

:react-native-os:compileReleaseJavaWithJavac
:react-native-os:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
D:\www\my\ReactNativePlayground\node_modules\react-native-os\android\src\main\java\com\peel\react\RNOSModule.java:31: error: method does not override or implement a method from a supertype
    @Override
    ^
1 error
:react-native-os:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-os:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

It seems that for now removing @ Override annotation is a workaround to successfully build the library.

@chriscohoat
Copy link

chriscohoat commented Feb 6, 2018

I have the same issue...since it happens every time I re-create node_modules I wrote a one line fix to remove the @Override at line 31:

cat node_modules/react-native-os/android/src/main/java/com/peel/react/RNOSModule.java | sed -e '31{/@Override/d;}' > RNOSModule.tmp.java && mv RNOSModule.tmp.java node_modules/react-native-os/android/src/main/java/com/peel/react/RNOSModule.java

Probably longer than it needs to be but it seems to work.

@filipemerker
Copy link

+1

@phillbaker
Copy link

phillbaker commented Mar 30, 2018

Released version 1.2.0 on NPM which should fix this issue. I don't have contributor rights on this repo to close this issue, but support will be ongoing at https://github.com/aprock/react-native-os.

@burdiuz burdiuz closed this as completed Apr 2, 2018
@akshay20jha
Copy link

I have the same issue...since it happens every time I re-create node_modules I wrote a one line fix to remove the @Override at line 31:

cat node_modules/react-native-os/android/src/main/java/com/peel/react/RNOSModule.java | sed -e '31{/@Override/d;}' > RNOSModule.tmp.java && mv RNOSModule.tmp.java node_modules/react-native-os/android/src/main/java/com/peel/react/RNOSModule.java

Probably longer than it needs to be but it seems to work.

how you used this line where to put can you please tell me

@chriscohoat
Copy link

@akshay20jha I think the issue has been fixed by now but I believe I just ran the one-liner in the root of the directory when I needed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants