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.

[Android] How to install with react-native-navigation?

See original GitHub issue

Everything else is clear in Android installation but editing the MainActivity.java. Since with react-native-navigation MainActivity.java is way different than normal. Here is installation for it https://wix.github.io/react-native-navigation/#/installation-android

As you can see MainActivity.java is pretty empty:

 import com.reactnativenavigation.controllers.SplashActivity;

 public class MainActivity extends SplashActivity {

 }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
henrikracommented, Nov 24, 2017

Sorry I accidentally put MainActivity stuff to MainApplication 😄 So there are really two problems only:

  1. When adding createReactActivityDelegate inside MainActivity.java it says error: method does not override or implement a method from a supertype pointing at createReactActivityDelegates @Override
error: cannot find symbol
    return new ReactActivityDelegate(this, getMainComponentName()) {
                                           ^

My full MainActivity looks like this now:

import com.reactnativenavigation.controllers.SplashActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends SplashActivity {
  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
        return new RNGestureHandlerEnabledRootView(MainActivity.this);
      }
    };
  }
}

1reaction
zachgibsoncommented, Apr 30, 2018

@kmagiera and @henrikra thanks for working on this! I’m needing to use both of these libs in a new project and now I can! Y’all are awesome. 👏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation | React Native Navigation - Open Source
In that case it's easier to install react-native-navigation using CocoaPods. ... Make sure your Android Studio installation is up to date.
Read more >
Getting started - React Navigation
Installing dependencies into a bare React Native project​. In your project directory, run: npm; Yarn. npm install ...
Read more >
How to properly install react-native-navigation on android
After switching to react-native-navigation from react-navigation my app cant launch properly. It either appears as a blank screen or immedialy ...
Read more >
react-native-navigation v2 react-native 0.56 android installation
Make sure your Android Studio installation is updated. We recommend editing gradle and java files in Android Studio as the IDE will suggest...
Read more >
Wix React Native Navigation quick installation guide - Medium
Installation for iOS is not a big deal, but Android requires more code updates. Therefore I will focus only on this platform. Add...
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