久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

與 Android 6.0 (Marshmallow) 的 Apache HTTP 連接

Apache HTTP connection with Android 6.0 (Marshmallow)(與 Android 6.0 (Marshmallow) 的 Apache HTTP 連接)
本文介紹了與 Android 6.0 (Marshmallow) 的 Apache HTTP 連接的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

有什么方法可以將 Apache 庫直接包含在 Gradle 中以使其與 Android 6.0 一起使用?

Is there is any way to include the Apache library directly in Gradle to make it work with Android 6.0 ?

我嘗試包含這樣的庫:

compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'

Android Studio 無法找到以下導入:

And Android Studio couldn't manage to find the following import:

import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.impl.auth.DigestScheme;

推薦答案

這個page 討論了 Apache HTTP 類的刪除,并提出了一種解決方法:

This page discusses the removal of the Apache HTTP classes, and it suggests a workaround as well:

要繼續使用 Apache HTTP API,您必須首先在 build.gradle 文件中聲明以下編譯時依賴項:

To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:

   android {
       useLibrary 'org.apache.http.legacy'
   }

在我的例子中,Android Studio 仍然抱怨找不到這些類,但應用確實構建并運行了.

In my case Android Studio still complained that it couldn't find these classes, but the app did build and run.

不過,該頁面確實建議您移至 HttpURLConnection.

The page does recommend you move to HttpURLConnection, though.

這篇關于與 Android 6.0 (Marshmallow) 的 Apache HTTP 連接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 三级视频久久 | 亚洲精品一二区 | 午夜精品导航 | 国产精品国产亚洲精品看不卡15 | 久草新在线 | 青草青草久热精品视频在线观看 | av在线伊人 | 久久a久久 | 99精品久久久国产一区二区三 | 亚洲va欧美va人人爽午夜 | 亚洲精品在线免费 | 亚洲国产精品福利 | 日日骚视频 | 亚洲精品视频免费观看 | 欧美三区 | 狠狠影院 | 欧美乱操| 国内精品久久久久久影视8 最新黄色在线观看 | 天天色综 | 精品一区二区三区免费视频 | 欧美一区二区三区,视频 | 中文字幕 在线观看 | 久久精品欧美一区二区三区不卡 | 韩国久久 | 精品视频一区二区三区在线观看 | 久久大全 | 国产清纯白嫩初高生在线播放视频 | 国产精品毛片一区二区在线看 | 免费 视频 1级 | 久久精品视频在线免费观看 | 国产精品毛片无码 | 久久精品亚洲 | 在线免费观看毛片 | 麻豆精品一区二区三区在线观看 | 欧美日韩在线精品 | 国产又色又爽又黄又免费 | 成人h视频在线观看 | 国产综合在线视频 | 超碰成人免费 | 国产99视频精品免视看9 | 免费观看av网站 |