skiptools / skiptools/skip

Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17...

Open
#161 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

project setup
Dominant language
Swift
Stars
3.2k
Forks
106
Avg merge
6d 13h
Merged PRs (30d)
1

Description

I'm not entirely sure what happened, but I recently updated to the latest Skip version and started getting the following error when trying to compile my project in Xcode.

* What went wrong:
Could not determine the dependencies of task ':app:packageDebug'.
> Could not create task ':app:compileDebugJavaWithJavac'.
   > Failed to calculate the value of task ':app:compileDebugJavaWithJavac' property 'javaCompiler'.
      > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.

It's not clear to me why it's referencing languageVersion=17. I have the following installed:

jeff@M3-MBP Android % java --version
openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment Homebrew (build 21.0.3)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.3, mixed mode, sharing)
jeff@M3-MBP Android % echo $JAVA_HOME
/opt/homebrew/Cellar/openjdk@21/21.0.3

Skip checkup seems to work properly:

[✓] Skip version 0.8.55 (= 0.8.55)
[✓] macOS version 14.5 (> 13.5.0)
[✓] Swift version 5.10 (> 5.9.0)
[✓] Xcode version 15.4 (> 15.0.0)
[✓] Xcode tools SDKs: 9
[✓] Homebrew version 4.3.7 (> 4.1.0)
[✓] Gradle version 8.8 (> 8.6.0)
[✓] Java version 21.0.3 (> 21.0.0)
[✓] Android Debug Bridge version 1.0.41 (> 1.0.40)
[✓] Android Studio version: 2023.3
[✓] Android tools SDKs: 4
[✓] Resolve dependencies (6.53s)
[✓] Build hello-skip (7.16s)
[✓] Test Swift (4.58s)
[✓] Test Kotlin (27.85s)
[✓] Archive iOS ipa (12.12s)
[✓] Assemble HelloSkip-release.ipa 37 KB
[✓] Verify HelloSkip-release.ipa 37 KB
[✓] Assembling Android apk (63.56s)
[✓] Verify HelloSkip-release.apk 12.8 MB
[✓] Check Swift Package (0.15s)
[✓] Skip 0.8.55 checkup succeeded in 122.45s

I tried initializing a new Skip app project and compiled it fine with Xcode. I'm not sure what happened to my project, but it seems odd that it would fail to use the proper Java version.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Gradle task :app:compileDebugJavaWithJavac and compare the failing project with a newly initialized Skip app, which reportedly compiles in Xcode. Check how the project selects Java 17 when Java 21 is installed. Done means the existing project compiles successfully in Xcode without the missing-toolchain error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, java, swift
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.