如何使用Apache的遗产在Eclipse中,以支持Android中号 [英] How to use Legacy Apache in Eclipse in order to support Android M

查看:133
本文介绍了如何使用Apache的遗产在Eclipse中,以支持Android中号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android的男,谷歌已经完全删除的Apache HTTP客户端的支持。

On Android M, Google has completely removed the support of Apache HTTP client.

这也可能是造成如此多的应用程序崩溃在Android米

This might also be the cause for so many apps crashing on Android M.

从谷歌开发资源:

这preVIEW删除用于Apache HTTP客户端支持。如果您的应用   使用此客户端和目标的Andr​​oid 2.3(API级别9)或更高,   使用的HttpURLConnection类代替。此API是更有效的   因为它是通过透明的COM pression降低了网络的使用和   响应缓存,并且将功耗降至最低。要继续使用   Apache的HTTP API,则必须首先声明以下   编译时依赖于你的build.gradle文件:

This preview removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection class instead. This API is more efficient because it reduces network use through transparent compression and response caching, and minimizes power consumption. 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正在逐渐远离的OpenSSL到BoringSSL库。如果你正在使用Android NDK中   您的应用程序,不要对不属于加密库链接   NDK的API,如libcrypto.so和libssl.so的一部分。这些   库是不公开的API,并可能改变或破坏,恕不另行通知   跨版本和设备。此外,你可以把自己暴露于   安全漏洞。相反,修改本机code调用   Java加密的API通过JNI或者对一个静态链接   您所选择的加密库。

Android is moving away from OpenSSL to the BoringSSL library. If you’re using the Android NDK in your app, don't link against cryptographic libraries that are not a part of the NDK API, such as libcrypto.so and libssl.so. These libraries are not public APIs, and may change or break without notice across releases and devices. In addition, you may expose yourself to security vulnerabilities. Instead, modify your native code to call the Java cryptography APIs via JNI or to statically link against a cryptography library of your choice.

我用的Eclipse ,我没有摇篮,有什么解决方法吗?

I'm using Eclipse and I don't have Gradle, is there any workaround for this?

我真的需要快速更新的应用程序pretty的,但我不能将它移植到 Android的工作室现在

I really need to update an app pretty quickly but I can't port it to Android Studio right now

推荐答案

查找 org.apache.http.legacy.jar 这是安卓/ SDK /平台/ Android的-23 /可选,将它添加到你的依赖。

Find org.apache.http.legacy.jar which is in Android/Sdk/platforms/android-23/optional, add it to your dependency.

这篇关于如何使用Apache的遗产在Eclipse中,以支持Android中号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆