Sulav Timsina
Sulav Timsina

Reputation: 843

gradlew: Couldn't determine java version from '11.0.1'

I am using Mac OS (Mojave) and Android Studio 3.2.1. I am trying to use Fastlane tool for screenshot capturing.

When I run: ./gradlew assembleDebug assembleAndroidTest I get the following error:

  • FAILURE: Build failed with an exception.

    • What went wrong:

    Could not determine java version from '11.0.1'.

    • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

My java version according to java --versionis

java 11.0.1 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

How do I solve this issue?

Upvotes: 0

Views: 4687

Answers (2)

Sulav Timsina
Sulav Timsina

Reputation: 843

I found a git issue for this exact problem and the solution for it is:

https://github.com/openrndr/openrndr/pull/25/commits/684240c4da0c6223d0171e3f3273ee48b9094772

Upvotes: 0

shawn
shawn

Reputation: 4363

You can not use Java 11 for Android development

Please use a JDK 8.

If you have both JDK 8 and 11 installed, you can tell gradle to use one: How do I tell Gradle to use specific JDK version?

Upvotes: 1

Related Questions