android studio不能使用HttpClient

来源:互联网 发布:vb编写的大型软件 编辑:程序博客网 时间:2024/05/01 11:37

在android { }里添加useLibrary 'org.apache.http.legacy'

如下:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.zd.httpclicenttest"
        minSdkVersion 8
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    useLibrary 'org.apache.http.legacy'
}

0 0
原创粉丝点击