Open xjki opened 1 month ago
Somehow linked with https://github.com/skiptools/skip/issues/171 pehaps?
Creating new project and setting manual JAVA_HOME override in the project Build Phases-[Run skip graddle] at the top helps (as described here: https://github.com/skiptools/skip/issues/115#issuecomment-2098455645)
I think the message about the location of the sdkmanager
is a red herring – we don't actually expect the tool to be there, that is just the message that we output if we are unable to find any licenses in $ANDROID_HOME/licenses
. If you run ls $ANDROID_HOME/licenses
, do you see anything in that directory?
We will correct the error message about the expected location of the sdkmanager
tool, since you are correct that it is no longer installed there. FTR, it is now installed by Homebrew at /opt/homebrew/bin/sdkmanager
.
From your last comment, it sounds like overriding your JAVA_HOME manually is working around this problem. The previous JAVA_HOME that you cite (/usr/local/Cellar/openjdk/22.0.1/libexec/openjdk.jdk/Contents/Home
) sounds like it may have been a hold-over from a prior Intel-mac-installed version of Homebrew, which won't work with Skip.
I would recommend removing any old JAVA_HOME entries from your ~/.zshrc
and adding:
export JAVA_HOME=/opt/homebrew/opt/java
which will also have the advantage of keep it up with any future JDK updates that come along with Homebrew upgrades.
Please let us know if that helps address the issue. There are a bewildering number of issues that can arise from different combinations of JDKs, so it is nice to get all these on the record so we can improve skip checkup
's ability to diagnose and suggest resolutions to these issues.
If you run
ls $ANDROID_HOME/licenses
, do you see anything in that directory?
Yes, there are license files:
android-googletv-license android-sdk-license google-gdk-license mips-android-sysimage-license
android-sdk-arm-dbt-license android-sdk-preview-license intel-android-extra-license
From your last comment, it sounds like overriding your JAVA_HOME manually is working around this problem. The previous JAVA_HOME that you cite (
/usr/local/Cellar/openjdk/22.0.1/libexec/openjdk.jdk/Contents/Home
) sounds like it may have been a hold-over from a prior Intel-mac-installed version of Homebrew, which won't work with Skip.I would recommend removing any old JAVA_HOME entries from your
~/.zshrc
and adding:export JAVA_HOME=/opt/homebrew/opt/java
Perhaps tutorial/documentation should list Homebrew reinstall for Apple Silicon Macs (to avoid Intel-mac-installed version of Homebrew being used) as prerequisite if this is the one causing these issues? I suspect many will run into the same issues.
Thanks for answer and keep up the good work!
[✓] Skip version 0.10.2 (= 0.10.2) [✓] macOS version 14.5 (> 13.5.0) [✓] macOS architecture: ARM [✓] Swift version 5.10 (> 5.9.0) [✓] Xcode version 15.4 (> 15.0.0) [✓] Xcode tools SDKs: 5 [✓] Homebrew version 4.3.9 (> 4.1.0) [✓] Gradle version 8.9 (> 8.6.0) [✓] Java version 22.0.1 (> 21.0.0) [✓] Android Debug Bridge version 1.0.41 (> 1.0.40) [✓] Android Studio version: 2024.1 [!] Android SDK licenses need to be accepted with: ~/Library/Android/sdk/tools/bin/sdkmanager --licenses [✓] Resolve dependencies (14.93s) [✓] Build hello-skip (9.95s) [✓] Test Swift (7.86s) [✗] Test Kotlin (10.32s) [✓] Archive iOS ipa (24.86s) [✓] Assemble HelloSkip-release.ipa 37 KB [✓] Verify HelloSkip-release.ipa 37 KB [✗] Assembling Android apk (36.64s) [✗] Verify HelloSkip-release.apk: The file “app-release-unsigned.apk” couldn’t be opened because there is no such file. [✓] Check Swift Package (0.15s) [✓] Check Skip Updates: 0.10.2 [✗] Skip 0.10.2 checkup failed with 3 errors
Error fragment in the log file:
ANDROID_HOME env variable on Mac is set correctly, openJDK java from HomeBrew is used :
Android command-line tools are in the path and available in commandline without path prefix
PATH=~/Library/Android/sdk/cmdline-tools/latest/bin: ...