1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-07 21:05:13 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Update guide.md

This commit is contained in:
DengYun
2016-07-11 18:57:43 +08:00
committed by GitHub
parent de3ea04239
commit c51c944430

View File

@@ -71,7 +71,25 @@ npm config set disturl https://npm.taobao.org/dist --global
## 配置Bundle URL(Android)
在你的ReactActivity中增加下代码:
`0.29及以后版本`在你的MainApplication中增加下代码:
```java
// ... 其它代码
import cn.reactnative.modules.update.UpdateContext;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected String getJSBundleFile() {
return UpdateContext.getBundleUrl(this);
}
// ... 其它代码
}
}
```
`0.28及以前版本`在你的MainActivity中增加如下代码
```java
// ... 其它代码