Skip to content

Installation

Jokobee edited this page Jul 6, 2026 · 1 revision

Installation

llama-android ships as a single .aar containing the native llama.cpp / ggml libraries and the Kotlin API. Pick one of the two channels below.

Requirements

  • minSdk 24 (Android 7.0) or higher.
  • arm64-v8a device or emulator (any modern phone).
  • Kotlin coroutines (the heavy calls are suspend functions).

A) Maven Central (recommended)

build.gradle.kts:

dependencies {
    implementation("dev.ffmpegkit-maintained:llama-android:0.1.0")
}

Maven Central is already in the default repositories of a fresh Android project, so there is nothing else to configure.

B) JitPack

settings.gradle.kts — add the JitPack repo:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven(url = uri("https://jitpack.io"))
    }
}

build.gradle.kts:

dependencies {
    implementation("com.github.ffmpegkit-maintained:llama-android:v0.1.0")
}

Groovy DSL equivalent

// build.gradle
dependencies {
    implementation 'dev.ffmpegkit-maintained:llama-android:0.1.0'
}

Verify it linked

Call Llama.getSystemInfo() anywhere after startup — it returns the llama.cpp CPU feature string (e.g. NEON = 1 | ARM_FMA = 1 | …). If that runs without an UnsatisfiedLinkError, the native libraries loaded correctly.

android.util.Log.i("llama", Llama.getSystemInfo())

Next: Quick Start.

Clone this wiki locally