I need to see my dependencies in Gradle to fix a problem with multiple SLF4J bindings.
However, when I run 'gradle dependencies' I get the error:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
In a similar question in stack-overflow Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
it was recommended to
- install java jdk-14
- upgrade to gradle version 6.3
I changed the jdk to 14 in IntelliJ in 2 places:
- File -> Project Structure -> Project -> Project SDK
- Preferences -> Gradle -> Gradle JVM
I attempted to update gradle from the command line with: 'gradle wrapper --gradle-version 6.3' and got the same error:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
I then changed the field 'distributionUrl' in the file 'gradle-wrapper.properties' to 'gradle-6.3', as instructed here https://github.com/gradle/gradle/issues/10248.
I tried various combinations of jdk and gradle versions but nothing seems to work.
gradlew -versionshow on the command line? - tim_yatesgradlew -versiongives-bash: gradlew: command not found. There are however gradlew and gradlew.bat files in the current directory.gradle -versiongives `Gradle 6.0.1 ... Kotlin: 1.3.50 Groovy: 2.5.8 Ant: 1.10.7 JVM: 14 OS: Mac OS X 10.15.4 x86_64. - Joshua Spinak./gradlew -version. Is this an android app? Is is an app that's publicly available, so I can try it locally? - tim_yates./gradlew -versiondownloadedhttps://services.gradle.org/distributions/gradle-4.0-bin.zipand then gaveFAILURE: Build failed with an exception. Could not determine java version from '14'. - Joshua Spinak