Xutils Error: (37, 39) BUG: Unable to access Httprequestbase class file Org.apache.http.client.methods.HttpRequestBase not found

Source: Internet
Author: User

Android 6.0 (API) SDK has been forced to remove httpclient

Solution:

1 Lowering the API

Add a word to the 2build.gradle

Android {
Uselibrary ' Org.apache.http.legacy '
}
Like me:
Android {
Compilesdkversion 23
Buildtoolsversion "24.0.0"

Defaultconfig {
ApplicationID "Com.example.myapplication"
Uselibrary ' Org.apache.http.legacy '
Minsdkversion 15
Targetsdkversion 23
Versioncode 1
Versionname "1.0"
}
Buildtypes {
Release {
Minifyenabled false
Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro '
}
}
}
For more detailed resources, please refer to the GitHub address:
Https://github.com/wyouflf/xUtils

Xutils Error: (37, 39) BUG: Unable to access Httprequestbase class file Org.apache.http.client.methods.HttpRequestBase not found

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.