Android 打包,targetSdkVersion设置为28,遇到 java.io.IOException: Cleartext HTTP traffic to resourcests.gungunmobile.vn not permitted.
原因:Google对Android P 的应用程序,要求默认使用加密连接。
处理:
1.将 targetSdkVersion 降到 27 一下。
2.使用 https 加密连接。
3.修改网络安全配置:
<application
....
android:usesCleartextTraffic="true" >