VerifyError Exception on Android Studio

…衆ロ難τιáo~ 提交于 2019-12-25 03:07:58

问题


I'm running my app on Android Studio 1.3.2, and getting an exception that I can't get through. I've been searching on google for hours and didn't find the solution.

java.lang.VerifyError: org/apache/http/conn/ssl/DefaultHostnameVerifier
        at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:944)
        at com.romi.expensemanager.OCRServiceAPI.sendImage(OCRServiceAPI.java:62)
        at com.romi.expensemanager.OCRServiceAPI.convertToText(OCRServiceAPI.java:44)
        at com.romi.expensemanager.Main$1.run(Main.java:68)
        at java.lang.Thread.run(Thread.java:856)

I add external jars: httpclient-4.5.jar, httpcore-4.4.1.jar, httpmime-4.5.jar.

My build.gradle:

apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.romi.expensemanager"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/picasso-2.5.2.jar')
compile project(':httpclient-4.5')
compile project(':httpcore-4.4.1')
compile project(':httpmime-4.5')
}

Any help will be appreciated. Thanks.

来源:https://stackoverflow.com/questions/32634379/verifyerror-exception-on-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!