android / codelab-kotlin-coroutines

Kotlin Coroutines codelab
Apache License 2.0
552 stars 268 forks source link

Can not build codelab with java 15: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 #130

Closed illarionov closed 3 years ago

illarionov commented 3 years ago
Android Studio Arctic Fox | 2020.3.1 Canary 4
Build #AI-202.7319.50.2031.7049475, built on December 24, 2020
Runtime version: 11.0.8+0-b944-P17168821 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Linux 5.4.0-59-lowlatency

$ java -version
openjdk version "15-ea" 2020-09-15
OpenJDK Runtime Environment (build 15-ea+32-Ubuntu-220.04)
OpenJDK 64-Bit Server VM (build 15-ea+32-Ubuntu-220.04, mixed mode, sharing)

Build from console:

$ ./gradlew assembleDebug assembleDebugAndroidTest start:lintDebug finished_code:lintDebug testDebug

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

Build from Android Studio:

Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

Аfter updating gradle up to version 6.7.1 everything works fine:


$ gradle wrapper --gradle-version=6.7.1 --distribution-type=bin
$  ./gradlew assembleDebug assembleDebugAndroidTest start:lintDebug finished_code:lintDebug testDebug

BUILD SUCCESSFUL in 18s
126 actionable tasks: 52 executed, 74 up-to-date
``
wojtek-kalicinski commented 3 years ago

If you find bugs for tools such as Gradle or Android Studio/AGP, please file them in the bug trackers for these tools.