问题
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