2017-10-28 150 views
3

Android Studio更新至3.0,並且我的項目存在很多問題。目前發佈時出現錯誤,我無法找到解決方法。Android Studio更新問題

這是錯誤堆棧:

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 

回答

1

嘗試compileOnly 「com.google.auto.value:自動值:1.5」,annotationProcessor 「com.google.auto.value:自動值:1.5」 。 它應該使用gradle 3.0.0

1

嘗試Build > Clean Project並重新重建。