1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

解决Android 在RN0.27以上版本报错问题

This commit is contained in:
tdzl2003 2016-06-27 21:02:47 +08:00
parent 9c2f6cf900
commit 702ddbe011
6 changed files with 31 additions and 7 deletions

View File

@ -2,6 +2,10 @@
本组件是面向React Native提供热更新功能的组件建议结合[Update服务](http://update.reactnative.cn/)使用。
### 公告
因为React Native调整了okhttp的依赖对于0.27以上版本的React Native请安装1.1.x版本对于0.26及以前版本请安装1.0.x版本。
### 优势
1. 命令行工具&网页双端管理版本发布过程简单便捷完全可以集成CI。

View File

@ -19,6 +19,13 @@ android {
}
}
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../../node_modules/react-native/android"
}
}
dependencies {
compile 'com.facebook.react:react-native:+'
}

View File

@ -4,11 +4,10 @@ import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import com.facebook.stetho.inspector.elements.ShadowDocument;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import org.json.JSONException;
import org.json.JSONObject;

View File

@ -1,3 +1,9 @@
## 常见问题
#### 0.27以上版本RN报错问题
升级到1.1.x即可解决。
## 高级指南
#### 过期的版本

View File

@ -21,6 +21,14 @@ $ rnpm link react-native-update
* 注意 *
如果你的react-native版本小于或等于0.26,第二句请修改为
```bash
$ npm install --save react-native-update@1.0.x
```
* 注意 *
如果访问极慢或者显示网络失败,请使用淘宝镜像:
```bash
npm config set registry https://registry.npm.taobao.org --global

View File

@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "1.0.5",
"version": "1.1.0",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {
@ -23,7 +23,7 @@
"url": "https://github.com/reactnativecn/react-native-pushy/issues"
},
"peerDependencies": {
"react-native": ">=0.18.0"
"react-native": ">=0.27.0"
},
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
"dependencies": {