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

v3 Android build failure RN 0.59 #97

Closed
geraintwhite opened this issue Jun 1, 2020 · 5 comments
Closed

v3 Android build failure RN 0.59 #97

geraintwhite opened this issue Jun 1, 2020 · 5 comments

Comments

@geraintwhite
Copy link

Since v3 I am getting a build failure on Android using RN 0.59.

It looks like LayoutShadowNode.onBeforeLayout was changed in RN 0.60 from taking no arguments to taking one argument.

This module started using LayoutShadowNode.onBeforeLayout as of #85.

> Task :react-native-safe-area-context:compileDebugJavaWithJavac FAILED
/Users/geraintwhite/repos/work/newteam/cloud-voice-app/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewShadowNode.java:126: error: method does not override or implement a method from a supertype
  @Override
  ^
/Users/geraintwhite/repos/work/newteam/cloud-voice-app/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewShadowNode.java:133: error: method onBeforeLayout in class ReactShadowNodeImpl cannot be applied to given types;
    super.onBeforeLayout(nativeViewHierarchyOptimizer);
         ^
  required: no arguments
  found: NativeViewHierarchyOptimizer
  reason: actual and formal argument lists differ in length
2 errors
@janicduplessis
Copy link
Collaborator

Thanks for reporting this, I’ll see if there is a way to make it backwards compatible, but if not I’ll update the readme to mention 3.0 requires rn 0.60+.

@janicduplessis
Copy link
Collaborator

cc @jacobp100

@jacobp100
Copy link
Collaborator

So I know wix does this by having a 0.59 and 0.60 folder. https://github.com/wix/react-native-notifications/tree/master/android/app/src . I don’t know how it’s all linked together, and it might be more hassle than it’s worth

@janicduplessis
Copy link
Collaborator

@grit96 I think I found a working solution, can you try 3.0.3 to see if it fixes the issue?

@geraintwhite
Copy link
Author

Thanks @janicduplessis, 3.0.3 seems to work well.

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

3 participants