Problems using unirest in Android Studio

I get some errors in my logcat that crash my application while trying to execute some unirest requests. I know that you need to create a special unirest jar with all the dependencies, but I had problems with maven and I did not do this, instead I included the dependencies in the libs folder. I narrowed the problem down to this single error below.

Logcat:

java.lang.VerifyError: com/mashape/unirest/http/options/Options
        at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:154)
        at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:131)
        at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)

I understand that java.lang.verifyerror is raised by a different library set at compile time and runtime. But I do not know how to fix it. Please help, make sure that all the dependencies I need are below, because I have not used unirest before.

build.gradle:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/unirest-java-1.3.20.jar')
compile files('libs/rebound-0.3.6.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/json-20140107.jar')
compile files('libs/httpmime-4.3.5.jar')
compile files('libs/httpclient-4.3.5.jar')
compile files('libs/httpasyncclient-4.0.2.jar')
compile files('libs/httpcore-4.3.2.jar')
compile files('libs/commons-codec-1.6.jar')
compile files('libs/commons-logging-1.1.3.jar')
}

what my libs folder looks like:

commons-io-2.4.jar
httpcore-4.3.2.jar
httpclient-4.3.5.jar
commons-logging-1.1.3.jar
json-20140107.jar
rebound-0.3.6.jar
unirest-java-1.3.20.jar
commons-codec-1.6.jar
httpmime-4.3.5.jar
httpasyncclient-4.0.2.jar

build.gradle, gradle:

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}
+4
1

, , . , Android , org.apache.http. . , surrogate.org.apache.http, .

https://hc.apache.org/httpcomponents-client-4.3.x/android-port.html:

Google Android 1.0 BETA Apache HttpClient. Android, API Apache HttpClient 4.0 , . Apache HttpClient 4.0 , , Google . , . Apache HttpClient, Android, . Google , Apache HttpClient, . Android, API Apache HttpClient Android, , .

, :

( ) , , Android. HttpClient, "org.apache.http. **. * HC4".

dependencies {
    compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
}

httpcomponents.

, shadowJar, , .

:

, . , AndroidAsync Volley -.

+1

All Articles