org.apache.http.legacy doesn't work on API 28

后端 未结 5 1008
执念已碎
执念已碎 2020-12-10 15:58

To begin with, I was using org.apache.http functions for a while now and error came when I tried to launch my app on API 28. It\'s working on API 26 and API 23, but suddenly

5条回答
  •  無奈伤痛
    2020-12-10 16:39

    Step 1:
    create an xml file in res/xml/network_security_config.xml and copy the below code in it,

    
    
        
            your.website.domain 
        
    
    

    Step 2:
    now in your Manifest.xml add android:networkSecurityConfig="@xml/network_security_config" under the tag. Done!

提交回复
热议问题