Commit b44d0f4d by zhengnw@sobot.com

net 1.2.3 网络问题导致请求失败时,禁止自动重试

parent 63307c87
...@@ -10,7 +10,7 @@ android { ...@@ -10,7 +10,7 @@ android {
//这里就是打jar包 //这里就是打jar包
task makeJar(type: Copy) { task makeJar(type: Copy) {
//删除旧的jar包 //删除旧的jar包
delete 'build/libs/sobot_net_1.2.2.jar' delete 'build/libs/sobot_net_1.2.3.jar'
//原地址 //原地址
from('build/intermediates/packaged-classes/release/') from('build/intermediates/packaged-classes/release/')
//导出jar包的地址 //导出jar包的地址
...@@ -18,7 +18,7 @@ android { ...@@ -18,7 +18,7 @@ android {
//包含的jar包 //包含的jar包
include('classes.jar') include('classes.jar')
//重命名jar包为mysdk //重命名jar包为mysdk
rename ('classes.jar', 'sobot_net_1.2.2.jar') rename ('classes.jar', 'sobot_net_1.2.3.jar')
} }
makeJar.dependsOn(build) makeJar.dependsOn(build)
} }
......
...@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) { ...@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext { ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名 PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'net' //项目名 PUBLISH_ARTIFACT_ID = 'net' //项目名
PUBLISH_VERSION = '1.2.2' //版本号 PUBLISH_VERSION = '1.2.3' //版本号
} }
......
...@@ -44,9 +44,9 @@ public class SobotOkHttpUtils { ...@@ -44,9 +44,9 @@ public class SobotOkHttpUtils {
private Handler mDelivery; private Handler mDelivery;
public SobotOkHttpUtils(OkHttpClient okHttpClient) { public SobotOkHttpUtils(OkHttpClient okHttpClient) {
if (okHttpClient == null) { if (okHttpClient == null) {
OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder();
okHttpClientBuilder.retryOnConnectionFailure(false);//网络问题导致请求失败时,禁止自动重试
okHttpClientBuilder.addInterceptor(new SobotInternetPermissionExceptionInterceptor()); okHttpClientBuilder.addInterceptor(new SobotInternetPermissionExceptionInterceptor());
mDelivery = new Handler(Looper.getMainLooper()); mDelivery = new Handler(Looper.getMainLooper());
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment