- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
在 AndroidStudio3.1
中更新我的依赖版本后,我开始收到以下错误:
Information:Gradle tasks [:app:assembleDebug]
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Blabla\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Error:com.android.tools.r8.ApiLevelException: Default interface methods are only supported starting with Android N (--min-api 24): java.util.Collection com.google.common.collect.BiMap.values()
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Blabla\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar
Information:BUILD FAILED in 6s
Information:4 errors
Information:0 warnings
Information:See complete output in console
我已经清理并重建了项目。检查了我的 "multiDexEnabled true"
和 'compile 'com.android.support:multidex:1.0.2'
已添加。
我还能做什么?
编辑:添加 build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.blabla"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:design:27.0.0'
compile 'com.android.support:cardview-v7:27.0.0'
compile 'com.jakewharton:butterknife:8.7.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.google.guava:guava:21.0'
compile 'com.microsoft.azure:azure-mobile-android:3.2.0@aar'
compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-crash:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-storage:11.4.2'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
compile 'com.google.android.gms:play-services-maps:11.4.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.maps.android:android-maps-utils:0.5+'
}
apply plugin: 'com.google.gms.google-services'
最佳答案
我在 react-native 项目中遇到了同样的问题,
以下几行对我有用,
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
关于android - 错误 :com. android.builder.dexing.DexArchiveBuilderException : Failed to process guava-21. 0.jar Android 3.1 Dev Channel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47136718/
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files defi
我试图在 avd 中运行我的应用程序,但是当我选择运行 gradle 时出现异常: Error:Error converting bytecode to dex: Cause: com.android
当我提取一个文件 aab 时出现这个错误: Invalid dex file indices, expecting file 'classes٢.dex' but found 'classes2.de
我有一个 ionic 项目。它已成功构建并在我的 android 手机中运行。突然有一天,当我运行命令“ionic cordova run android”时,我得到如下构建错误: Dex: Erro
这个问题在这里已经有了答案: Unable to execute dex: Multiple dex files define (31 个回答) 4年前关闭。 我更新了 android studio
从过去 3 天开始,我遇到了这个错误,并且已经尽了我所能。任何人都可以帮我纠正它。我正在使用 Android 3.0,我的 sdk 和 Google Play 服务已更新,并且我已将 multiDex
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.nnroh.debtmanager, PI
好的,现在我真的被困在这里了。我不知道该做什么,去哪里或任何事情! 我一直在尝试卸载、重新安装 SDK 和 Eclipse 版本,尝试用谷歌搜索出来,但是 nu-uh... 什么都没有!!! 我可以在
怎么了?为什么我有这个问题? Unable to execute dex: Multiple dex files define Lcom/nineoldandroids/animation/Anima
我尝试运行我的 android 应用程序,但出现此错误。 [2014-03-11 11:21:34 - Dex Loader] Unable to execute dex: Multiple dex
我希望指定包中的所有类都驻留在主 dex 文件中。 那里有使用通配符的选项吗? 最佳答案 很遗憾,不支持通配符。 但是,您可以使用 this script 生成 main-dex-list 文件。 .
我目前有一个来自霍尼韦尔的 DEX BLE-1 适配器,用于从自动售货机检索 dex 数据。我有一个 swift 3 iOS 应用程序,它使用 CoreBluetooth 进行扫描并与外围设备配对。该
我正在使用 IntelliJ IDEA 12.1.4,在我的项目中我使用了几个库/项目: ActionBarSherlock ViewPagerIndicator Volley ProgressShe
我在尝试运行我的项目时遇到了这个问题 - com.android.builder.dexing.DexArchiveBuilderException: Failed to process .gradl
我一直在四处寻找,有很多帖子与这个问题有关,但似乎没有确定的解决方案(例如 Error when building apk - "Multiple dex files define Lcom/goog
我正在对 Jan Berkel 的 SBT Android 插件进行一些黑客攻击,我在想是否有一种方法可以将多个 .dex 文件合并到一个 .dex 文件中包含所有这些。 例如,如果我有这个: cla
我在尝试运行我的应用程序时遇到了这些问题,但不知道如何解决... 谁能帮帮我 这是错误: [2014-04-18 18:47:35 - Dex Loader] Unable to execute de
这个问题在这里已经有了答案: Android support multidex library implementation (4 个回答) 4年前关闭。 生成签名的apk时,有这个错误,但构建项目是
我有一个 Android 应用程序,(理论上)它可以变成一个库并放入外部应用程序中。然后外部应用程序可以创建一个包含我的应用程序的选项卡。库应用程序的设置方式与 google-play-service
我正在开发一个 android 应用程序并且 gradle 构建工作正常但是现在当我构建我的 android 项目时,gradle 构建失败并显示以下错误 Error converting bytec
我是一名优秀的程序员,十分优秀!