7

Hello everyone once I update my android studio to Arctic fox while publishing the artifact(command - ./gradlew assembleRelease artifactoryPublish) I am getting this error. I have written below gradle details please help me out for the same

JDK version: 11

gradle.properties or gradle version

https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

Build tool version

 classpath 'com.android.tools.build:gradle:7.0.3'

Kotlin Version

1.5.31
Mahi
  • 1,754
  • 2
  • 16
  • 37
  • 8
    Major version 61 is Java 17 - https://javaalmanac.io/bytecode/versions/. The Java version you are using on the command line is Java 17, not Java 11 - fix that in the command line environment, be it bash, zsh or cmd. The project setup JDK (`Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK`) can differ from the command line env JDK. Type `javac -version` to confirm. Also try running the gradle task directly from the gradle tasks list in the IDE - the will use the Project JDK if you are not successful setting the command line JDK. – Mark Oct 21 '21 at 19:25
  • @MarkKeen I am executing that command(./gradlew assembleRelease artifactoryPublish) from the android terminal and after checking java version from android terminal its showing 17 but I can see the project setting its 11 not sure why its talking system java JDK not android one – Mahi Oct 22 '21 at 02:23
  • please check this: https://stackoverflow.com/a/73509483/4479395 – MUHAMMED IQBAL PA Aug 27 '22 at 08:39
  • @Mark very useful comment and clearly explains what's wrong. Thanks! – Kaushik May 10 '23 at 21:42

0 Answers0