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.

v3 Android build failure RN 0.59

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jacobp100commented, Jun 1, 2020

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

0reactions
grit96commented, Jun 10, 2020

Thanks @janicduplessis, 3.0.3 seems to work well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native 0.59 development build fails with metro server ...
try to clean run ./gradlew clean from android folder once to clean up previous builds and run again · Have tried that already,...
Read more >
Upgrading to RN 0.59 with Android project giving ENOSPC ...
FAILURE : Build failed with an exception. Where: Build file '/bitrise/src/GametimeAndroid/App/build.gradle' line: 391.
Read more >
AndroidX Support in React Native Apps - Enappd
In this post, we will learn about How to Migrate Android Support Packages into AndroidX in React Native 0.59.
Read more >
npx react-native run-android build failed - You.com
I get this error when i run npx react-native run-android in folder. ... npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.10 => 0.59.10 ...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
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