首页 > 其他分享 >org.apache.http.conn.scheme.SchemeRegistry

org.apache.http.conn.scheme.SchemeRegistry

时间:2023-03-28 15:06:33浏览次数:50  
标签:google HTTP cn SchemeRegistry apache http android Android 客户端


出现此问题的机型:小米 8,android系统版本为:9。

应用为免费小说

下载地址为 安卓免费小说点我下载

解决方案见官方文档:https://developer.android.google.cn/about/versions/pie/android-9.0-changes-28

Apache HTTP 客户端弃用
在 Android 6.0 中,我们取消了对 Apache HTTP 客户端的支持。 从 Android 9 开始,默认情况下该内容库已从 bootclasspath 中移除且不可用于应用。

要继续使用 Apache HTTP 客户端,以 Android 9 及更高版本为目标的应用可以向其 AndroidManifest.xml的application节点下 添加以下内容:

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<application
        android:name=".MyApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
 
        <uses-library
            android:name="org.apache.http.legacy"
            android:required="false" />
        
        <activity
            android:name=".DisplayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
    </application>

并在


application的节点中


添加

android:usesCleartextTraffic="true"
<application
        android:name=".ReaderApplication"
        android:allowBackup="true"
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar"
        android:usesCleartextTraffic="true"
        >

官方文档

https://developer.android.google.cn/about/versions/pie/android-9.0-changes-28

标签:google,HTTP,cn,SchemeRegistry,apache,http,android,Android,客户端
From: https://blog.51cto.com/u_14523369/6154896

相关文章

  • Apache Cordova介绍
    ApacheCordova介绍作者:chszsApacheCordova是一套设备API,允许移动应用的开发者使用JavaScript来访问本地设备的功能,比如摄像头、加速计。它可以与UI框架(如jQueryMobile或......
  • WebForm之企业微信开发(1)——准备httphelper
    usingSystem;usingSystem.IO;usingSystem.Net;usingSystem.Text;publicclassHttpHelper{///<summary>///发起一个HTTP请求(以POS......
  • C# .net6 razor 注入 HttpContext
    1、  2、 ......
  • HTTP 协议常用返回状态码
    1、什么是Http状态码状态码是客户端向服务器发送请求的时候,描述返回的请求结果的参数,借助Http状态码,可以让用户知道这次请求是正常处理,还是出现了错误。状态码由3位数字和原......
  • 对象引用对于非静态的字段、方法或属性“HttpContext.User”是必需的
    控制器内的HttpContext是从ControllerBase继承的属性,如果在控制器外使用HttpContext只是一个类,因此只能访问它的静态成员。为了访问它,您必须通过或沿线路注入HttpContext......
  • vue全家桶进阶之路8:Axios的安装与HTTP请求实战
    Axios是一个基于Promise的HTTP客户端,用于在浏览器和Node.js中发送HTTP请求。它可以使用在Vue中发送请求以及与后端API进行交互。在Vue中使用Axios可以通过以下步骤:安装A......
  • http请求中加号被替换为空格?源码背后的秘密(转)
    addby zhj: 我比较奇怪,为什么Postman等Http客户端在发送请求时,为什么不默认对QueryString中的值进行EncodeURIComponent呢?非要让用户手动选择。其实Postman默认对Que......
  • 3-1初识HTTP|3-3HTTP报文|3-5HTTP方法|3-7GET和POST方法的对比|3-9状态码
    HTTP是什么超文本传输协议(HyperTextTransferProtocol,HTTP)是一个简单的请求-响应协议,它通常运行在TCP之上。它指定了客户端可能发送给服务器什么样的消息......
  • HTTP和HTTPS
    一、HTTP和HTTPS的基本概念HTTP超文本传输协议(HyperTextTransferProtocol)设计目的:提供一种发布和接受HTML页面的方法HTTP是以明文方式发送信息,不安全。HTTP原理:通......
  • 初识HTTP&HTTP报文&HTTP方法
    初识HTTPHTTP是什么?HyperTextTransferProtocol超文本传输协议HTML:超文本标记语言超文本:原先一个个单一的文本,通过超链接将其联系起来,由原先的单一的文......