All Products
Search
Document Center

Simple Log Service:Install Simple Log Service SDK for Android

Last Updated:Dec 08, 2025

Before using Simple Log Service (SLS) SDK for Android to call the API operations of SLS, install SLS SDK for Android.

Prerequisites

Installation

  1. Create an Android project.

  2. Configure the following code in build.gradle in the root directory of the 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. Configure the following code in the build.gradle in the directory of a specified module.

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

    After dependency packages are imported, you can call the API operations that are encapsulated in SLS SDK for Android in the project.

What to do next

Get started with Simple Log Service SDK for Android