我想在Android的工作室使用这些库:
I want to use these libraries in android studio:
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
我下面的视频教程中,导师是使用Eclipse,所以我知道它的工作原理。
I am following a video tutorial in which the tutor is using Eclipse so I know it works.
但更多的东西/库,我一定要添加到AndroidStudio使用它们?
But what additional things/libraries I have to add to AndroidStudio to use them?
HttpClient的是pcated于Android的5.1和从Android SDK中去除的Android 6.0代$ P $。虽然有一个解决办法继续的Android 6.0使用的HttpClient与Android工作室,你真的需要转移到别的东西。这别的东西可以是:
HttpClient was deprecated in Android 5.1 and is removed from the Android SDK in Android 6.0. While there is a workaround to continue using HttpClient in Android 6.0 with Android Studio, you really need to move to something else. That "something else" could be:
内置经典的Java的HttpURLConnection
为Android Apache的独立包装的HttpClient
OkHttp (我的建议)
AndroidAsync
the built-in classic Java HttpUrlConnection
Apache's independent packaging of HttpClient for Android
OkHttp (my recommendation)
AndroidAsync
或者,这取决于你的HTTP的工作性质,你可以选择支持更高阶的操作(例如,用于改造Web服务API)库。
Or, depending upon the nature of your HTTP work, you might choose a library that supports higher-order operations (e.g., Retrofit for Web service APIs).
上一篇:我怎么可以附加在电子邮件中的图像文件?加在、图像文件、电子邮件、我怎么
下一篇:安卓:android.view.ViewRoot $ CalledFromWrongThreadException - 如何解决这个问题?解决这个问题、view、android、CalledFrom