All Products
Document Center

Project configuration

Last Updated: Oct 29, 2021

This topic describes the SDK reference of the short video SDK for Android and shows you how to integrate the SDK.


The following table describes the environment requirements for development.





Android 4.3 or later.


Java 1.7 or later.


Android API level 18 or later.

Android Studio

Android Studio 2.3 or later. To download Android Studio, visit Android Studio.

SDK reference

  • V3.17.0 or later

    For more information, see SDK Reference.

    To upgrade the existing SDK to the latest version, download the upgrade tool.

  • Earlier than V3.17.0

    For more information, see SDK Reference.

SDK integration

Integrate the SDK by using Maven (recommended)

  1. Add the Alibaba Cloud Maven repository.

    Add the URL of the Maven repository to the build.gradle file.

    allprojects {
        repositories {
            maven {
                url ''

  2. Add dependencies to the Maven project.

        implementation ''// Required dependency for the short video SDK.
        implementation '' // Required dependency for a core library.
        implementation  'com.alivc.conan:AlivcConan:1.0.3' // Required dependency for a core library.
       // AlivcFFmpeg must be 4.3.0 or later. Select one of the following versions. 
        implementation '' // Dedicated dependency for the short video SDK with a small package size. 
        implementation  '' // Dependency that is shared by short video SDKs and player SDKs. If these two types of SDKs are connected at the same time, use this version. 
        implementation  '' // Optional dependency for an upload library.
        implementation '' // A third-party dependency library.
        implementation 'com.squareup.okhttp3:okhttp:3.2.0' // A third-party dependency library.


The short video SDK supports only armeabi-v7a and arm64-v8a instruction sets. To ensure the compatibility with armeabi, copy the .so files in the armeabi-v7a folder to the armeabi folder. The compatibility with ARMv5 and ARMv6 devices is insignificant because Android rapidly develops and the short video SDK is applicable only to Android 4.3 or later.

Manually integrate the SDK

Import AAR packages

  1. Create a module.

    In Android Studio, choose File>New>Newmodule to create a module as a library. For example, AliyunSvideoLibrary.

  2. Copy AliyunSdk-RCE.aar, AlivcConan-x.x.x.aar, and AlivcCore.jar from the decompressed SDK package to the new module and add them to your project.

  3. Add the dependencies on the AAR and JAR packages by using Gradle.

    dependencies {
     implementation fileTree(include: ['*.jar','*.aar'], dir: 'libs')
  4. Add the dependency of the AliyunSvideoLibrary module to the app module.

     dependencies {
        implementation project(":AliyunSvideoLibrary")

Import .so files

  1. Copy the jniLibs folder from the decompressed SDK package to the main folder of the app module. Then, declare the path of jniLibs in the build.gradle file of the app module.

    The following code provides an example:

    android {
     sourceSets.main {
         jni.srcDirs = []
         jniLibs.srcDir "src/main/jniLibs" 
  2. Load the dynamic-link libraries that are required by the SDK.

    These dynamic-link libraries are contained in the latest version of the SDK. You are not required to manually load the dynamic-link libraries.

    You can use the following libraries: The third-party library on which the SDK depends. The library that is required for audio resampling.
  3. Add the dependencies that are required by the upload feature.

    Videos are uploaded based on the upload SDK and Object Storage Service (OSS). If the upload feature is not required, skip this step.

    implementation ''
    implementation ''
    implementation 'com.squareup.okhttp3:okhttp:3.2.0'
    implementation 'com.aliyun.dpa:oss-android-sdk:+'
  4. Initialize the configuration.

    Call the onCreate method of the Application class in the app module.


Required permissions

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Permissions need to be dynamically requested in Android 6.0 or later.

Obfuscation configuration

You can perform the obfuscation configuration in the file. The following code provides an example:

######################Obfuscation configuration of the short video SDK#########################
-keep class com.aliyun.**{*;}
-keep class com.duanqu.**{*;}
-keep class com.qu.**{*;}
-keep class**{*;}
-keep class component.alivc.**{*;}
-keep class com.alivc.**{*;}