发布1.0.6

This commit is contained in:
itgaojian 2023-07-07 11:29:57 +08:00
parent c9e7ae240d
commit 23093a5168
4 changed files with 25 additions and 9 deletions

View File

@ -41,3 +41,12 @@
``` ```
1.辖区人口添加人口类型筛选条件 1.辖区人口添加人口类型筛选条件
``` ```
### 2023-7-7 (1.0.6)
```
1.数据统计
2.Icon替换
3.升级方式改变 通知栏->Dialog
```

View File

@ -10,8 +10,8 @@
{ {
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"versionCode": 6, "versionCode": 7,
"versionName": "1.0.5", "versionName": "1.0.6",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }
] ]

View File

@ -23,20 +23,27 @@ public class ExceptionHandler {
public static void handleException(Throwable throwable) { public static void handleException(Throwable throwable) {
if (throwable instanceof HttpException) { if (throwable instanceof HttpException) {
HttpException ex = (HttpException) throwable; HttpException ex = (HttpException) throwable;
ex.printStackTrace();
try { try {
String errBody = ex.response().errorBody().string(); String errBody = ex.response().errorBody().string();
LogUtils.e(ex.getMessage());
LogUtils.e(errBody);
if (!TextUtils.isEmpty(errBody)) { if (!TextUtils.isEmpty(errBody)) {
ErrorBean errorBean = new Gson().fromJson(errBody, ErrorBean.class); ErrorBean errorBean = new Gson().fromJson(errBody, ErrorBean.class);
if (!TextUtils.isEmpty(errorBean.getMsg())) { if (!TextUtils.isEmpty(errorBean.getMsg())) {
ToastUtils.show(errorBean.getMsg()); ToastUtils.show(errorBean.getMsg() + "(" + errorBean.getCode() + ")");
} else if (!TextUtils.isEmpty(errorBean.getMessage())) { } else if (!TextUtils.isEmpty(errorBean.getMessage())) {
ToastUtils.show(errorBean.getMessage()); ToastUtils.show(errorBean.getMessage() + "(" + errorBean.getCode() + ")");
} else if (errBody.contains("404")) {
ToastUtils.show("无法连接到服务器,请检查网络连接后再试(404)");
} else if (errBody.contains("500")) {
ToastUtils.show("服务器发生错误(500)");
} else { } else {
ToastUtils.show("网络错误,请稍后重试"); ToastUtils.show("服务器发生错误");
} }
} }
} catch (Exception e1) { } catch (Exception e1) {
ToastUtils.show("网络错误,请稍后重试"); ToastUtils.show("网络错误,请稍后重试(500)");
e1.printStackTrace(); e1.printStackTrace();
} }
} else if (throwable instanceof JsonParseException) { } else if (throwable instanceof JsonParseException) {
@ -44,7 +51,7 @@ public class ExceptionHandler {
} else if (throwable instanceof SocketTimeoutException) { } else if (throwable instanceof SocketTimeoutException) {
ToastUtils.show("网络连接超时"); ToastUtils.show("网络连接超时");
} else { } else {
ToastUtils.show("网络错误,请稍后重试"); ToastUtils.show("服务器发生错误(500)");
} }
} }

View File

@ -55,8 +55,8 @@ ext {
gCompileSdkVersion = 30 gCompileSdkVersion = 30
gMinSdkVersion = 21 gMinSdkVersion = 21
gTargetSdkVersion = 30 gTargetSdkVersion = 30
gVersionCode = 6 gVersionCode = 7
gVersionName = '1.0.5' gVersionName = '1.0.6'
gBuildToolsVersion = "29.0.2" gBuildToolsVersion = "29.0.2"
// gVersionCode=26 // gVersionCode=26
// gVersionName='1.3.0' // gVersionName='1.3.0'