Gradle Setup
Repository Configuration
Add the required repositories to yoursettings.gradle.kts:
settings.gradle.kts
Dependencies
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-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 yourAndroidManifest.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 →