Merge pull request #17 from skim6281/master

update manual android installation guide
This commit is contained in:
Bartol Karuza 2019-04-02 11:40:45 +02:00 committed by GitHub
commit 132af3166d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -22,17 +22,17 @@
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactnativecommunity.cameraroll.RNCCamerarollPackage;` to the imports at the top of the file
- Add `new RNCCamerarollPackage()` to the list returned by the `getPackages()` method
1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.reactnativecommunity.cameraroll.CameraRollPackage;` to the imports at the top of the file
- Add `new CameraRollPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':@react-native-community/cameraroll'
project(':@react-native-community/cameraroll').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cameraroll/android')
include ':@react-native-community_cameraroll'
project(':@react-native-community_cameraroll').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cameraroll/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':@react-native-community/cameraroll')
compile project(':@react-native-community_cameraroll')
```
## Migrating from the core `react-native` module