Skip to main content

Gradle Setup

Repository Configuration

Add the required repositories to your settings.gradle.kts:
settings.gradle.kts

Dependencies

Add the RunAnywhere SDK to your module-level build.gradle.kts:
build.gradle.kts (Module: app)
Include only the modules you need. Each native module adds to your APK size: - runanywhere-llamacpp-android: ~34MB (for LLM/VLM text generation) - runanywhere-onnx-android: ~25MB (for STT, TTS, and VAD)

Build Configuration

build.gradle.kts (Module: app)

Module Overview

Supported Model Formats

Android Manifest

Add the required permissions to your AndroidManifest.xml:
AndroidManifest.xml
INTERNET is required for model downloads. RECORD_AUDIO is needed for STT and Voice Pipeline. MODIFY_AUDIO_SETTINGS is needed for TTS audio playback. Runtime permission for RECORD_AUDIO must be requested via ActivityResultContracts.RequestPermission().

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 →