Skip to content

Commit 0fac8a2

Browse files
authored
Merge pull request #4 from xagreenpoint/master
更新最新代码
2 parents 3f92056 + ee68f0a commit 0fac8a2

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,24 @@ NSURL *jsCodeLocation = [LDRNDiffUpdate jsBundleUrl:@"LDBusinessEntry"];
4545
```
4646

4747
#### android使用方式
48+
##### 在Android中有时候npm 的link会不成功,这时可通过如下步骤进行配置:
49+
##### 找到 android/settings.gradle文件并添加:
50+
```
51+
include ':react-native-diff-update'
52+
project(':react-native-diff-update').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-diff-update/android')
53+
```
54+
##### 找到 android/app/build.gradle 文件并添加:
55+
```
56+
dependencies {
57+
compile project(':react-native-diff-update')
58+
```
59+
##### 配置完后需要在应用启动的第一个Activity的onCreate方法中调用
60+
LeadeonDiff.startDiff(this);
61+
##### 在程序退出时调用
62+
LeadeonDiff.stopDiff(this);
63+
##### 注意:this指的是Android中的Context。
64+
4865

49-
在应用启动时启动RnModuleDiffUpdateService这个service,当应用关闭时请停止此service。
5066

5167
## 版本请求接口说明
5268

0 commit comments

Comments
 (0)