Skip to content

Commit ef6fa8b

Browse files
committed
Update Installation steps for AndroidX with backward-compatibility
1 parent eb3cd2e commit ef6fa8b

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,53 @@
3535

3636
### Mostly automatic installation
3737

38+
#### Using React Native >= 0.60
39+
Linking the package manually is not required anymore with [Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
40+
41+
- **iOS Platform:**
42+
43+
`$ cd ios && pod install && cd ..` # CocoaPods on iOS needs this extra step
44+
45+
- **Android Platform for Android Support:**
46+
47+
Using [Jetifier tool](https://github.com/mikehardy/jetifier) for backward-compatibility.
48+
49+
Modify your **android/build.gradle** configuration:
50+
```
51+
buildscript {
52+
ext {
53+
buildToolsVersion = "28.0.3"
54+
minSdkVersion = 16
55+
compileSdkVersion = 28
56+
targetSdkVersion = 28
57+
# Only using Android Support libraries
58+
supportLibVersion = "28.0.0"
59+
}
60+
```
61+
62+
- **Android Platform for AndroidX:**
63+
64+
Modify your **android/build.gradle** configuration:
65+
```
66+
buildscript {
67+
ext {
68+
buildToolsVersion = "28.0.3"
69+
minSdkVersion = 16
70+
compileSdkVersion = 28
71+
targetSdkVersion = 28
72+
# Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
73+
androidXAnnotation = "1.1.0"
74+
androidXBrowser = "1.0.0"
75+
// Put here other AndroidX dependencies
76+
}
77+
```
78+
79+
#### Using React Native < 0.60
80+
3881
`$ react-native link react-native-inappbrowser-reborn`
3982

4083
### Manual installation
4184

42-
4385
#### iOS
4486

4587
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`

0 commit comments

Comments
 (0)