Android Studio已更新至3.0,我的项目存在很多问题。目前发布时出现错误,我无法找到解决方法。
这是错误堆栈:
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/nikitagudkovs/.gradle/caches/modules-2/files-2.1/com.google.auto.value/auto-value/1.5.2/1b94ab7ec707e2220a0d1a7517488d1843236345/auto-value-1.5.2.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing autovalue/shaded/com/google$/common/collect/$ImmutableMap.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Error:Execution failed for task ':app:transformClassesWithDexBuilderForJivaDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException:
Failed to process /Users/nikitagudkovs/.gradle/caches/modules-2/files-2.1/com.google.auto.value/auto-value/1.5.2/1b94ab7ec707e2220a0d1a7517488d1843236345/auto-value-1.5.2.jar
答案 0 :(得分:1)
尝试compileOnly“com.google.auto.value:auto-value:1.5”和annotationProcessor“com.google.auto.value:auto-value:1.5”。 它应该与gradle 3.0.0一起使用
答案 1 :(得分:1)
尝试Build > Clean Project
并重新重建。