$ npm install raininfall/react-native-x5 --save
$ react-native link react-native-x5
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import github.raininfall.react.x5.RNX5Package;
to the imports at the top of the file - Add
new RNX5Package()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-x5' project(':react-native-x5').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-x5/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-x5')
import RNX5 from 'react-native-x5';
// TODO: What to do with the module?
RNX5;