久久久久久久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 連接的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

有什么方法可以將 Apache 庫(kù)直接包含在 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 ?

我嘗試包含這樣的庫(kù):

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

Android Studio 無(wú)法找到以下導(dǎo)入:

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;

推薦答案

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

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

要繼續(xù)使用 Apache HTTP API,您必須首先在 build.gradle 文件中聲明以下編譯時(shí)依賴項(xiàng):

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 仍然抱怨找不到這些類,但應(yīng)用確實(shí)構(gòu)建并運(yùn)行了.

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

不過(guò),該頁(yè)面確實(shí)建議您移至 HttpURLConnection.

The page does recommend you move to HttpURLConnection, though.

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

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

相關(guān)文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫(kù)的多風(fēng)味應(yīng)用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫(kù)的傳遞依賴)
主站蜘蛛池模板: 久久精品国产99国产精品 | 日本粉嫩一区二区三区视频 | 国产精品毛片 | 亚洲在线观看视频 | heyzo在线| 精品三级在线观看 | 欧美日韩在线免费观看 | 蜜桃视频在线观看免费视频网站www | 天堂网中文字幕在线观看 | 日韩二区| 久久r久久| 91在线导航 | 成人美女免费网站视频 | 国产精品一区二区在线 | re久久| 红色av社区 | 精品欧美一区二区三区久久久 | 一区二区三区欧美 | 国产永久免费 | 精品一区二区三区在线观看国产 | 成人精品一区 | 在线观看www视频 | 久久国产精品久久国产精品 | 99国产精品久久久 | 亚洲欧美日韩电影 | 伊人成人免费视频 | 成人午夜网站 | 国产精品成人一区二区三区夜夜夜 | 中文字幕在线剧情 | 久久99网 | 美日韩精品 | 国产伦精品一区二区三区四区视频 | 国产特级毛片aaaaaa喷潮 | 精品免费国产一区二区三区四区 | 午夜精品一区二区三区三上悠亚 | 日韩在线欧美 | 成人av片在线观看 | 中文字幕在线视频免费观看 | 精品久久久久久久久久久 | 91亚洲精品国偷拍自产在线观看 | 成年视频在线观看福利资源 |