Skip to main content

Gradle Setup

Add the RunAnywhere SDK to your module-level build.gradle.kts:
build.gradle.kts (Module: app)
dependencies {
    // Core SDK (required)
    implementation("com.runanywhere.sdk:runanywhere-kotlin:0.1.4")

    // LLM support - llama.cpp backend (~34MB)
    implementation("com.runanywhere.sdk:runanywhere-core-llamacpp:0.1.4")

    // STT/TTS/VAD support - ONNX backend (~25MB)
    implementation("com.runanywhere.sdk:runanywhere-core-onnx:0.1.4")
}
Include only the modules you need. Each native module adds to your APK size: - runanywhere-core-llamacpp: ~34MB (for LLM text generation) - runanywhere-core-onnx: ~25MB (for STT, TTS, and VAD)

Module Overview

ModuleSizeFeatures
runanywhere-kotlin~2MBCore SDK, model management, events
runanywhere-core-llamacpp~34MBLLM text generation (GGUF models)
runanywhere-core-onnx~25MBSTT, TTS, VAD (ONNX models)

Supported Model Formats

FormatExtensionBackendUse Case
GGUF.ggufllama.cppLLM text generation
ONNX.onnxONNX RuntimeSTT, TTS, VAD
ORT.ortONNX RuntimeOptimized STT/TTS

Android Manifest

Add the required permissions to your AndroidManifest.xml:
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
INTERNET is required for model downloads. RECORD_AUDIO is only needed if you’re using STT or VAD with microphone input.

ProGuard Rules

If using ProGuard/R8 minification, add these rules:
proguard-rules.pro
-keep class com.runanywhere.sdk.** { *; }
-keepclassmembers class com.runanywhere.sdk.** { *; }

Next Steps

Quick Start

Initialize the SDK and run your first inference →