Skip to content

Releases: skiptools/swift-android-toolchain

6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a

18 Jul 15:50
b98819b
Compare
Choose a tag to compare
Pre-release

Installing the Swift Android SDK

First install the matching Swift 6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a toolchain from https://swift.org/download/#releases and add it to your PATH, or by using swiftly:

swiftly install 6.2-snapshot-2025-07-17-a

Then install the Swift Android SDK by running the command:

swift sdk install https://github.com/skiptools/swift-android-toolchain/releases/download/6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a-android-0.1.artifactbundle.tar.gz --checksum a9b245fc4f15986325e68ca76e129b248caf677535e1b727b765fb3794a80c0a

Installing the Android NDK

The Swift Android SDK requires the Android Native Development Toolkit (NDK) to function, which must be installed separately. Download and unzip the r27c LTS release and set the ANDROID_NDK_HOME environment variable to the local NDK installation and run the setup script.

macOS configuration command for android-ndk-r27c-darwin.zip:

ANDROID_NDK_HOME=~/Downloads/android-ndk-r27c ~/Library/org.swift.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Linux configuration command for android-ndk-r27c-linux.zip:

ANDROID_NDK_HOME=~/android-ndk-r27c ~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

GitHub Actions:

~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Note

GitHub Actions already includes the Android NDK and defines ANDROID_NDK_HOME, so there is no need to install the NDK separately. Alternatively, you can use the swift-android-action to build Swift packages and run Android tests from a GitHub workflow.

Building Swift Packages for Android

Now you can compile a Swift package for Android with:

$ git clone https://github.com/apple/swift-algorithms.git
$ cd swift-algorithms/
$ swiftly run swift build --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-17-a

Running Swift Executables on Android

If you have a connected Android device with USB debugging enabled, or are running an Android emulator, you can create and run a Swift executable with the following commands:

$ mkdir ExecutableDemo
$ cd ExecutableDemo
$ swift package init --type executable
$ swiftly run swift build --static-swift-stdlib --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-17-a
$ adb push .build/debug/ExecutableDemo /data/local/tmp/
$ adb shell /data/local/tmp/ExecutableDemo

6.1.1

25 May 14:32
a19e122
Compare
Choose a tag to compare
6.1.1 Pre-release
Pre-release

Install this SDK by installing the matching Swift 6.1.1 toolchain from https://swift.org/download/#releases and add it to your PATH, or by using swiftly:

swiftly install 6.1.1

Then install the Android SDK by running the command:

swift sdk install https://source.skip.tools/swift-android-toolchain/releases/download/6.1.1/swift-6.1.1-RELEASE-android-0.1.artifactbundle.tar.gz --checksum cc5ed104653f4aceaa1acd3d162acc45921f77ed2a5dddaaeb66ef1e62d630a0

Next, install the Android NDK r27c LTS release and set the ANDROID_NDK_HOME environment variable to the local NDK installation and run the setup script. For example, on macOS, run:

ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/27.0.12077973 ~/Library/org.swift.swiftpm/swift-sdks/swift-6.1.1-RELEASE-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Now you can compile your Swift package for Android with:

swiftly run swift build --swift-sdk aarch64-unknown-linux-android28 +6.1.1

6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a

10 Jul 18:28
a19e122
Compare
Choose a tag to compare
Pre-release

Installing the Swift Android SDK

First install the matching Swift 6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a toolchain from https://swift.org/download/#releases and add it to your PATH, or by using swiftly:

swiftly install 6.2-snapshot-2025-07-09-a

Then install the Swift Android SDK by running the command:

swift sdk install https://github.com/skiptools/swift-android-toolchain/releases/download/6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a-android-0.1.artifactbundle.tar.gz --checksum 616ee6ba58a56f2039b94718e852fa9c6e8117747b4489eeb6f7c394cdab8727

Installing the Android NDK

The Swift Android SDK requires the Android Native Development Toolkit (NDK) to function, which must be installed separately. Download and unzip the r27c LTS release and set the ANDROID_NDK_HOME environment variable to the local NDK installation and run the setup script.

macOS configuration command for android-ndk-r27c-darwin.zip:

ANDROID_NDK_HOME=~/Downloads/android-ndk-r27c ~/Library/org.swift.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Linux configuration command for android-ndk-r27c-linux.zip:

ANDROID_NDK_HOME=~/android-ndk-r27c ~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

GitHub Actions:

~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-09-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Note

GitHub Actions already includes the Android NDK and defines ANDROID_NDK_HOME, so there is no need to install the NDK separately. Alternatively, you can use the swift-android-action to build Swift packages and run Android tests from a GitHub workflow.

Building Swift Packages for Android

Now you can compile a Swift package for Android with:

$ git clone https://github.com/apple/swift-algorithms.git
$ cd swift-algorithms/
$ swiftly run swift build --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-09-a

Running Swift Executables on Android

If you have a connected Android device with USB debugging enabled, or are running an Android emulator, you can create and run a Swift executable with the following commands:

$ mkdir ExecutableDemo
$ cd ExecutableDemo
$ swift package init --type executable
$ swiftly run swift build --static-swift-stdlib --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-09-a
$ adb push .build/debug/ExecutableDemo /data/local/tmp/
$ adb shell /data/local/tmp/ExecutableDemo

6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a

07 Jul 19:02
a19e122
Compare
Choose a tag to compare
Pre-release

Installing the Swift Android SDK

First install the matching Swift 6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a toolchain from https://swift.org/download/#releases and add it to your PATH, or by using swiftly:

swiftly install 6.2-snapshot-2025-07-04-a

Then install the Swift Android SDK by running the command:

swift sdk install https://github.com/skiptools/swift-android-toolchain/releases/download/6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a-android-0.1.artifactbundle.tar.gz --checksum e61b8f31567d1096a0f8f6b716609af1e7a1886457a0933ac7d8fd20d4ea617e

Installing the Android NDK

The Swift Android SDK requires the Android Native Development Toolkit (NDK) to function, which must be installed separately. Download and unzip the r27c LTS release and set the ANDROID_NDK_HOME environment variable to the local NDK installation and run the setup script.

macOS configuration command for android-ndk-r27c-darwin.zip:

ANDROID_NDK_HOME=~/Downloads/android-ndk-r27c ~/Library/org.swift.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Linux configuration command for android-ndk-r27c-linux.zip:

ANDROID_NDK_HOME=~/android-ndk-r27c ~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

GitHub Actions:

~/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-04-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh

Note

GitHub Actions already includes the Android NDK and defines ANDROID_NDK_HOME, so there is no need to install the NDK separately. Alternatively, you can use the swift-android-action to build Swift packages and run Android tests from a GitHub workflow.

Building Swift Packages for Android

Now you can compile a Swift package for Android with:

$ git clone https://github.com/apple/swift-algorithms.git
$ cd swift-algorithms/
$ swiftly run swift build --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-04-a

Running Swift Executables on Android

If you have a connected Android device with USB debugging enabled, or are running an Android emulator, you can create and run a Swift executable with the following commands:

$ mkdir ExecutableDemo
$ cd ExecutableDemo
$ swift package init --type executable
$ swiftly run swift build --static-swift-stdlib --swift-sdk aarch64-unknown-linux-android28 +6.2-snapshot-2025-07-04-a
$ adb push .build/debug/ExecutableDemo /data/local/tmp/
$ adb shell /data/local/tmp/ExecutableDemo

6.1

01 Apr 14:04
Compare
Choose a tag to compare

Install this SDK by installing the Swift 6.1 toolchain from https://swift.org/download/#releases and then running the command:

swift sdk install https://source.skip.tools/swift-android-toolchain/releases/download/6.1/swift-6.1-RELEASE-android-24-0.1.artifactbundle.tar.gz --checksum f8696e3e84111b8c2c6f6e564b6266357987ea8d4aa3b2cf92f144357acde1c9

6.0.3

06 Jan 23:44
Compare
Choose a tag to compare

Install this SDK on macOS or Linux by installing the Swift 6.0.3 toolchain from https://swift.org/download/#releases and then running the command:

swift sdk install https://source.skip.tools/swift-android-toolchain/releases/download/6.0.3/swift-6.0.3-RELEASE-android-24-0.1.artifactbundle.tar.gz --checksum 4566f23ae2d36dc5c02e915cd67d83b2af971faca4b2595fdd75cf0286acfac1

6.0.2

29 Oct 17:29
Compare
Choose a tag to compare

Install this SDK on macOS or Linux by installing the Swift 6.0.2 toolchain from https://swift.org/download/#releases and then running the command:

swift sdk install https://source.skip.tools/swift-android-toolchain/releases/download/6.0.2/swift-6.0.2-RELEASE-android-24-0.1.artifactbundle.tar.gz --checksum d75615eac3e614131133c7cc2076b0b8fb4327d89dce802c25cd53e75e1881f4

6.0.1

25 Sep 21:30
Compare
Choose a tag to compare

5.10.1

07 Sep 13:31
Compare
Choose a tag to compare