-
Notifications
You must be signed in to change notification settings - Fork 151
Manual Installation
Kevin Cooper edited this page Sep 11, 2018
·
3 revisions
If react-native link
doesn't work for you, you can manually add the following lines of code to your app.
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
);
}
In your terminal from your app's directory:
cd ios
pod install