This topic describes how to compile and debug the demo of the audio and video terminal SDK for Android.
Background information
The demo of the audio and video terminal SDK contains the following modules: Short video SDK + Queen SDK, ApsaraVideo Player SDK, and the push SDK. You can use the entire demo or one or more modules based on your business requirements. Each of the three modules can be independently run as a sub-demo.
Download the demo package
To download the demo package, see MONE_demo_opensource_android.
Set up the runtime environment
Download and install Android Studio.
Install the plugin 4.1.2 of Gradle 6.5.
Install Java Development Kit (JDK) 11 in Android Studio. Perform the following operations:
In the left-side navigation pane of the Preferences page, choose Build, Execution, Deployment -> Build Tools -> Gradle and select 11 from the Gradle JDK drop-down list.
NoteIf 11 does not appear in the drop-down list, update your Android Studio to a later version.

Configure a signature for the demo
To prevent security risks, the demo of the audio and video terminal SDK does not provide a license. To use the demo, you must configure a signature.
In the demo package, find the build.gradle configuration file in the AIOApp folder and set the signingConfigs parameters. The following image shows the details.

Request a license
If you want to independently run the sub-demos, you must request a license for each sub-demo. In this example, a license is requested for the entire demo.
Create an application and configure a license. You can create the license file based on the package name and the signature of the application. For more information, see Obtain a license.
Download License File.Copy the license file to the AIOApp/src/main/assets directory.
Open the AIOApp/src/main/AndroidManifest.xml file and set the com.aliyun.alivc_license.licensekey parameter to the license key that you kept.
Set the com.aliyun.alivc_license.licensefile parameter to the license file that you downloaded.

Project structure
project
-----AIOApp The main entry to the entire demo.
-----AliLivePushDEMO The sub-demo of the push SDK, which provides the solution to live stream ingest and the solution to stream ingest for screen recording.
------ alivc-livepusher-demo The main entry to the sub-demo of the push SDK.
------ beauty The integration of the retouching feature.
-----AlivcUgsvDEMO The sub-demo of the short video SDK, which provides the solution to video shooting, the solution to video cropping, and the solution to video editing.
------ AUIUgsvBase The basic library for the short video SDK.
------ AUIVideoEditor The solution to video editing.
------ AUIVideoRecorder The solution to video shooting.
------ AUICrop The solution to video cropping.
------ UGSVAPP The main entry to the sub-demo of the short video SDK.
-----PlayerDEMO The sub-demo of ApsaraVideo Player SDK, which provides the solution to stream playback, the solution to full-screen playback, and the solution to immersive playback.
------ AUIFlowFeed The solution to stream playback.
------ AUIFullScreen The solution to full-screen playback.
------ AUIVideoList The solution to immersive playback.
------ AUIPlayerApp The main entry to the sub-demo of ApsaraVideo Player SDK.
-----AndroidThirdParty The module that is used to define the dependencies of third-party libraries.
-----AUIFoundation The module for basic AUI capabilities.
------ AUIBaseUI The basic UI components.
------ AVTheme The module that is used to switch the UI themes. The demo supports only the dark mode.
------ AVMatisse The album-related component that is used select albums. The component is optimized based on the open source Matisse.
------ AVUtils The library of basic tools.
-----SDKs The ARR package of the SDK.