**NOTE: This guide is intended for Android development on Windows platform, for alternative platforms, check:**
- [Working for Android on macOS](https://github.com/raysan5/raylib/wiki/Working-for-Android-(on-macOS))
- [Working for Android on Linux](https://github.com/raysan5/raylib/wiki/Working-for-Android-(on-Linux))
> [!NOTE]
> This guide is intended for Android development on Windows platform, for alternative platforms, check:
> - [Working for Android on macOS](https://github.com/raysan5/raylib/wiki/Working-for-Android-(on-macOS))
> - [Working for Android on Linux](https://github.com/raysan5/raylib/wiki/Working-for-Android-(on-Linux))
## Installing required tools
Android requires a set of tools to do all the build process to generate a .APK game.
Android requires a set of tools to do all the build process to generate an APK:
### 1. Open JDK
You can just download the JDK from [here](https://jdk.java.net/13/) and decompress it in a directory, raylib `Makefile.Android` scripts looks for it on`C:\open-jdk`.
You can download the JDK from [here](https://jdk.java.net/13/) and extract it to a directory. The raylib `Makefile.Android` scripts expect it to be located at`C:\open-jdk`.
### 2. Android SDK
Actually, Android SDK is composed by a series of tools, you can install everything in a go just downloading [Android Studio](https://developer.android.com/studio/#downloads) and installing the full package.
Actually, the Android SDK consists of several tools, but you can install everything at once by downloading [Android Studio](https://developer.android.com/studio/#downloads) and installing the full package.
Alternatively, you can just install the required files manually. To do that, start downloading `Command line tools` package, found at the end of this [page](https://developer.android.com/studio/#command-tools).
Alternatively, you can install only the required tools manually. To do this, download the Command line tools package, located at the bottom of this [page](https://developer.android.com/studio/#command-tools).
- Decompress downloaded `sdk-tools-...` file into a folder named `android-sdk`. One of the included tools is the [sdkmanager]((https://developer.android.com/studio/command-line/sdkmanager)), a command line utility to install required packages.
- From command line, navigate to `android-sdk/tools/bin` and execute the following commands:
With those commands you're installing all required tools. It includes: `tools`, `build-tools`, `platform-tools`, `platforms\android-28` api level and also `extras\google\usb_driver` (that you need to install to connect to your device).
### 3. Android NDK
- Decompress the downloaded `sdk-tools-...` file into a folder named `android-sdk`. One of the included tools is [sdkmanager](https://developer.android.com/studio/command-line/sdkmanager), a command-line utility for installing the required packages.
To develop with raylib in C, we need to install the Android Native Development Kit. You can download it from [here](https://developer.android.com/ndk/downloads/). Android NDK includes support files for multiple Android APIs and multiple architectures. raylib scripts expect to use NDK r21 and found it available on `C:\android-ndk`.
- Open a command prompt, navigate to `android-sdk/tools/bin`, and run the following commands:
The Android NDK supports multiple Android APIs and architectures (ABIs). The supported ABIs are: `armeabi-v7a`, `arm64-v8a`, `x86`, and `x86_64`. Support for `riscv64` is experimental in the latest NDK versions (see [this](https://github.com/google/android-riscv64) for details).
By default, Raylib’s scripts use NDK r21 and expect it to be located at `C:\android-ndk`.
### 4. Compiling raylib for Android
You can build raylib using either **CMake** or **Make**. Follow the steps below depending on your preferred method.
* `<build_system>` → Your build system generator. `Ninja` is recommended.
* `<path_to_ndk>` → Full path to your installed Android NDK directory.
* `<abi>` → Target CPU architecture: `armeabi-v7a`, `arm64-v8a`, `x86`, or `x86_64`.
* `<minimum-api-level>` → Minimum Android API level to support (See [this](https://developer.android.com/ndk/guides/cmake#android_platform) for details).
- After building, the static library `libraylib.a` will be located in `Build/raylib/`
2. **Using Make**
- Navigate to the source folder:
```
cd raylib/src
```
- Build the library:
```
make clean
make PLATFORM=PLATFORM_ANDROID \
ANDROID_NDK=<path_to_ndk> \
ANDROID_API_VERSION=<minimum-api-level> \
ANDROID_ARCH=<abi>
```
- By default, the static library `libraylib.a` will be generated in `raylib/src/`
> [!WARNING]
> Your Android device may have a 64-bit CPU, but the installed OS could still be 32-bit. Make sure the selected ABI matches your device architecture.
> [!NOTE]
> You can build raylib as a shared library (`-DBUILD_SHARED_LIBS=ON` for CMake, `RAYLIB_LIBTYPE=SHARED` for Make), but this is discouraged due to [known issues](https://github.com/raysan5/raylib/issues/5114).