-
Notifications
You must be signed in to change notification settings - Fork 456
Manual Linking Android
terrylinla edited this page Feb 14, 2018
·
1 revision
-
npm install @terrylinla/react-native-sketch-canvas --save -
Add the following lines to
android/settings.gradle:include ':@terrylinla/react-native-sketch-canvas' project(':@terrylinla/react-native-sketch-canvas').projectDir = new File(rootProject.projectDir, '../node_modules/@terrylinla/react-native-sketch-canvas/android') -
In
android/app/build.gradle, add the following lines inside the dependencies block :compile project(':react-native-svg') -
Edit
MainApplication.java(inandroid/app/src/main/java/...) :...... import com.terrylinla.rnsketchcanvas.SketchCanvasPackage; // <--- add here ...... public class MainApplication extends Application implements ReactApplication { ...... @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( ...... new SketchCanvasPackage(), // <------ add here ...... ); } ...... }