For developers · Checked 1 October 2026

The Swift SDK for Android

Short answer: the Swift SDK for Android is an official Swift.org bundle that lets you cross-compile Swift from macOS or Linux for Android devices and emulators. You install three pieces: an open-source Swift toolchain whose version matches the SDK exactly, the SDK itself, and the Android NDK LTS r30. Apps usually keep their UI in Kotlin or Java and load Swift as shared libraries inside the .apk, calling it through swift-java, which handles JNI for you.

What to install

From Swift.org «Getting Started with the Swift SDK for Android», read 1 October 2026.

ComponentWhat it isHow
Swift toolchainCompiler and tools on your Mac or Linux machine; must be open source and match the SDK versionswiftly install latest (Swift 6.4.0 at the time of writing)
Swift SDK for AndroidSwift libraries, headers and config to cross-compile for Androidswift sdk install <url> --checksum <sum>; check with swift sdk list
Android NDKHeaders, system libraries and linkers for Android architecturesLTS r30; set ANDROID_NDK_HOME

Why the Xcode toolchain isn’t enough

Even if Swift is installed through Xcode, cross-compiling with a Swift SDK requires an open-source toolchain, and its version has to match the SDK version exactly. Swift.org recommends swiftly to install and switch toolchains on macOS and Linux.

Building and running

Create a package with swift package init --type executable, then build for Android with swift build --swift-sdk <sdk-name> and a target triple, such as aarch64-unknown-linux-android23 for arm64 devices or x86_64-unknown-linux-android23 for the emulator, adding --static-swift-stdlib. To try a command-line binary, push it and the NDK’s libc++_shared.so to the device with adb push and run it there; wireless debugging on Android 17 is covered in ADB Wi-Fi 2.0.

From a binary to an Android app

Android apps aren’t command-line tools, so for a real app you build your Swift modules as shared libraries for each architecture and package them in the .apk. The app, typically written in Kotlin or Java, calls Swift through the swift-java interoperability library and tools; Swift Java JNI Core is the low-level option. Swift.org points to its Android Examples repository for complete apps and to the Android category of the Swift forums for help.

What Swift 6.4 changed for Android

The Swift 6.4 SDK for Android is built with the LTS NDK 30, which provides Android availability attributes in the Swift runtime libraries and in your packages. SwiftPM’s new default build system, Swift Build, supports Android directly, removing the need for a post-install script, and Swift/Java interop now handles async and throwing functions in protocol and callback wrappers. More in what’s new in Swift 6.4.

Where Censuus fits

Sharing code across iOS and Android gets your app onto both stores; being found brings users to both listings. Censuus ranks apps by the visits they draw, and adding your app is free on the List my app form. Placement comes from traffic and sponsorship: apps climb on the visits they draw, and a sponsor can pay to rise higher.

Frequently asked questions

Can I build Android apps with Swift?

Yes. The official Swift SDK for Android cross-compiles Swift for Android. Apps typically package Swift as shared libraries and call them from Kotlin or Java through swift-java.

Which NDK does the Swift SDK for Android need?

The Android NDK LTS version 30 (r30), located through the ANDROID_NDK_HOME environment variable.

Can I use the Swift from Xcode?

No. Cross-compiling with a Swift SDK needs an open-source Swift toolchain whose version exactly matches the SDK; swiftly is the recommended way to install it.

Which Android architectures can I build for?

Swift.org’s guide shows builds for aarch64 (arm64 devices) and x86_64 (emulators), using target triples such as aarch64-unknown-linux-android23.

Guides for app developers

Put your app in the ranking

Censuus ranks apps by the visits they draw and by sponsorship, no bots. Listing is free; sponsorship raises placement.