android - 没有 Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier 类型的静态字段实例;
问题描述
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes2.dex)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146)
at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
at com.example.mainui.cleorgpk.SpeechToText.mtdh01_conversion(SpeechToText.java:289)
at com.example.mainui.Learning.lambda$viewListeners_Audio$3$Learning(Learning.java:177)
我尝试了根据 StackSite 处理它的所有其他方法但发现没有有效的解决方案我 的问题问题是我使用了下面给出的 Apache 的 HttpClient
- 实现 'org.apache.httpcomponents:httpcore:4.4.10'
- 实现 'org.apache.httpcomponents:httpclient:4.5.6'
implementation group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
implementation('org.apache.httpcomponents:httpmime:4.5.6') { exclude module: 'httpclient' }
implementation 'org.apache.httpcomponents:httpclient-android:4.3.5'
但他们根本没有帮助......一些帮助完整的信息
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
`
defaultConfig {
applicationId "com.example.mainui"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}`
解决方案
推荐阅读
- angular - 上传到 go daddy 的 Angular Web 应用程序显示空白页面
- azure-devops - 如何使用 Azure DevOps Server 在管道上使用 vmImage?
- python-3.x - 无法单击 Selenium 中的按钮
- google-chrome-devtools - 为什么 Chrome 85 Devtools 中缺少体验行?
- javascript - 正则表达式验证没有特殊字符的 URL/URI
- javascript - 使用 vue-test-utils 和 Jest 测试方法的内部逻辑
- c# - 如何通过 ref 将参数传递给成员变量?
- javascript - 每分钟在不同位置重新定位视频上的水印,无需插件
- python - 使用 selenium 查找空输入框
- graphql - 为什么多个媒体字段返回相同的图像?