1哥牍、閃退,報錯如下
Java.lang.NoClassDefFoundError: Failed resolutionof:Lorg/apache/http/conn/scheme/SchemeRegistry;
解決方案:
在AndroidManifest.xml文件的application標(biāo)簽里面加入
<uses-libraryandroid:name="org.apache.http.legacy"android:required="false"/>
2环鲤、Android 9 Pie:http及https的網(wǎng)絡(luò)連接問題
解決方案:
(1)在res的xml目錄下纯趋,新建一個xml文件(名稱自定義,如:network_security_config.xml),內(nèi)容如下:
<?xml version="1.0" encoding="utf-8"?><network-security-config><base-configcleartextTrafficPermitted="true"/></network-security-config>
(2)在manifest清單文件配置application:
<application...android:networkSecurityConfig="@xml/network_security_config".../>
作者:QQ蔓
鏈接:http://www.reibang.com/p/9415f83df810
來源:簡書
著作權(quán)歸作者所有。商業(yè)轉(zhuǎn)載請聯(lián)系作者獲得授權(quán)吵冒,非商業(yè)轉(zhuǎn)載請注明出處纯命。