Gradle Setup
Add the RunAnywhere SDK to your module-levelbuild.gradle.kts:
build.gradle.kts (Module: app)
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
| Module | Size | Features |
|---|---|---|
runanywhere-kotlin | ~2MB | Core SDK, model management, events |
runanywhere-core-llamacpp | ~34MB | LLM text generation (GGUF models) |
runanywhere-core-onnx | ~25MB | STT, TTS, VAD (ONNX models) |
Supported Model Formats
| Format | Extension | Backend | Use Case |
|---|---|---|---|
| GGUF | .gguf | llama.cpp | LLM text generation |
| ONNX | .onnx | ONNX Runtime | STT, TTS, VAD |
| ORT | .ort | ONNX Runtime | Optimized STT/TTS |
Android Manifest
Add the required permissions to yourAndroidManifest.xml:
AndroidManifest.xml
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
Next Steps
Quick Start
Initialize the SDK and run your first inference →