android9.0 不能联网问题

今天出现同事反馈他的小米8手机安装apk,不能联网.

但是用另一个同事的小米8却可以.对比发现一台是android 8.0版本,一个是android 9 版本,报错如下:

01-24 15:55:09.006 25755 26012 D testConnect===: http://dev.isignet.cn:8080

01-24 15:55:09.006 25755 26012 W System.err: java.io.IOException: Cleartext HTTP traffic to dev.isignet.cn not permitted

01-24 15:55:09.006 25755 26012 W System.err:    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)

01-24 15:55:09.007 25755 26012 W System.err:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)

01-24 15:55:09.007 25755 26012 W System.err:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)

01-24 15:55:09.007 25755 26012 W System.err:    at cn.org.bjca.signet.helper.utils.C.a(Unknown Source:35)

01-24 15:55:09.007 25755 26012 W System.err:    at cn.org.bjca.signet.b.t.a(Unknown Source:26)

01-24 15:55:09.007 25755 26012 W System.err:    at cn.org.bjca.signet.b.t.doInBackground(Unknown Source:0)

解决方案参考如下博客

https://blog.csdn.net/gengkui9897/article/details/82863966

    原文作者:璇_c2be
    原文地址: https://www.jianshu.com/p/6c018d6309b3
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞