File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments