All Products
Search
Document Center

Simple Log Service:Install SLS SDK for Android

Last Updated:Jun 03, 2026

Install SLS SDK for Android to call SLS API operations from your Android app.

Prerequisites

Installation

  1. Create an Android project.

  2. Add the following to the root-level build.gradle of your project.

    buildscript {
        // ...
        repositories {
            mavenCentral()
    
            // (Optional) Add the aliyun maven configuration to improve the access speed. 
            // mirror of google()
            maven { url 'https://maven.aliyun.com/repository/google' }
            // mirror of central & jcenter
            maven { url 'https://maven.aliyun.com/repository/public' }
        }
        // ...
    }
    
  3. Add the following dependency to your module-level build.gradle.

    implementation 'io.github.aliyun-sls:aliyun-log-android-sdk:2.7.0@aar'

    You can then call SLS SDK for Android APIs in your project.

What to do next

Get started with Simple Log Service SDK for Android