File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ rnpm link
25
25
26
26
#### Android
27
27
28
- In Android, Add it in your root build.gradle at the end of repositories:
28
+ In Android, Add it in your ** root** ` build.gradle ` at the end of repositories:
29
29
30
30
``` groovy
31
31
allprojects {
@@ -36,10 +36,32 @@ allprojects {
36
36
}
37
37
```
38
38
39
- Please provide ` CustomTabsPackage ` in your Application class.
39
+ And, provide ` CustomTabsPackage ` in your Application class.
40
40
41
- * [ example/MainApplication.java] ( https://github.com/droibit/react-native-custom-tabs/blob/develop/example/android/app/src/main/java/com/github/droibit/android/reactnative/customtabs/example/MainApplication.java#L28 )
42
- * [ Register the Module] ( https://facebook.github.io/react-native/docs/native-modules-android.html#register-the-module )
41
+ ``` java
42
+ @Override
43
+ protected List<ReactPackage > getPackages() {
44
+ return Arrays . asList(
45
+ ... ,
46
+ new CustomTabsPackage ()
47
+ );
48
+ }
49
+ ```
50
+
51
+ If you use version ` 0.1.5 ` or higher, change the ** app** ` build.gradle ` .
52
+
53
+ ``` groovy
54
+ android {
55
+ ...
56
+ compileSdkVersion 25
57
+ buildToolsVersion "25.0.1"
58
+ }
59
+
60
+ dependencies {
61
+ ...
62
+ compile "com.android.support:appcompat-v7:25.0.1"
63
+ }
64
+ ```
43
65
44
66
## Usage
45
67
You can’t perform that action at this time.
0 commit comments