- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我在使用 Android Studio 构建我的应用程序时遇到了这个错误。 APK 已编译,但当我尝试在 Android P 模拟器上运行该应用程序时,它会崩溃并抛出以下错误。详情请见附件:
java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
这是我的 build.grade 文件。如果有人对可能出现的问题提出建议,我将不胜感激。非常感谢。
android {
compileSdkVersion 'android-P'
buildToolsVersion '28-rc1'
useLibrary 'org.apache.http.legacy'
//for Lambda
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
defaultConfig {
applicationId "xxx.xxx.xxx"
minSdkVersion 17
targetSdkVersion 27
versionCode xxxx
versionName "Vx.x.x"
multiDexEnabled true
//other setting required
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a', 'x86', 'x86_64', 'mips', 'mips64'
}
最佳答案
更新:这不再是错误或解决方法,如果您的应用针对 API 级别 28 (Android 9.0) 或更高版本并使用适用于 Android 16.0.0 或更低版本的 Google Maps SDK,则需要它(或者如果您的应用程序使用 Apache HTTP Legacy 库)。它现在包含在 official docs 中.公开的问题是closed作为预期的行为。
这是 bug在 Google Play 服务方面,在修复之前,您应该可以通过将其添加到您的 AndroidManifest.xml
来解决此问题。里面<application>
标签:
<uses-library android:name="org.apache.http.legacy" android:required="false" />
关于android - java.lang.NoClassDefFoundError :failed resolution of :Lorg/apache/http/ProtocolVersion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50461881/
SSL3.0 specification/page22 提供了以下结构描述: The structure of the client hello is as follows. struct {
我在使用 Android Studio 构建我的应用程序时遇到了这个错误。 APK 已编译,但当我尝试在 Android P 模拟器上运行该应用程序时,它会崩溃并抛出以下错误。详情请见附件: java
我正在使用 Google map Android SDK 11.6.2(也尝试过 15.0.1),但在 map 显示之前我遇到了以下崩溃。已在 list 中检查 API key ,它可用,但仍然出现此
我是一名优秀的程序员,十分优秀!