Skip to content

Manual Installation

Kevin Cooper edited this page Sep 11, 2018 · 3 revisions

Manual Installation

If react-native link doesn't work for you, you can manually add the following lines of code to your app.

Android

In android/settings.gradle:

include ':react-native-snackbar'
project(':react-native-snackbar').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-snackbar/android')

In android/app/build.gradle:

dependencies {
    ...
    compile project(':react-native-snackbar')
}

In android/app/java/your.package.name/MainApplication.java:

import com.azendoo.reactnativesnackbar.SnackbarPackage;  // <- add this

...

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new SnackbarPackage() // <- add this
      );
    }

iOS

In your terminal from your app's directory:

cd ios
pod install
Clone this wiki locally
You can’t perform that action at this time.