Instructions for running the Android sample

[Last update: 10/06/2022]

Cubism SDK for Java is currently in alpha version, and the specifications may change in the beta or official version.

This page describes how to run the Android project sample application included in Live2D Cubism SDK for Java (alpha version) on an Android device using Android Studio.

The content of this article is based on Cubism 4 SDK for Java R1 alpha1 The article is based on Cubism 4 SDK for Java R1.
The method and procedure may differ depending on the version of Cubism SDK.

 

What you need

The main body of the SDK. Download from the dedicated Live2D Community page.

This is the development environment that will be used in this project. Use Android Studio Chipmunk or later.

Additional items that need to be installed from the "SDK Manager" of Android Studio are described in the next section.

 

setup procedure

Android Studio

Install the integrated development environment. The default settings are fine.
After installation, select SDK Manager from the "Tools" tab to install additional required tools.

 

  1. Check "Android 12.0(S)" under "SDK Platforms”.
  2. Install the "SDK Tools" tool as shown in the following image.

Android Emulator has the ability to improve performance by using the hardware acceleration feature.
("Intel x86 Emulator Accelerator (HAXM installer) (for Intel processors)" and "Android Emulator Hypervisor Driver for AMD Processors (installer) (for AMD processors))
However, if Hyper-V is enabled, "Windows Hypervisor Platform" must be enabled.
See the Android Studio User Guide for more information.

 

Build

The Android project uses Gradle as its build tool. After the sample application is launched, you can use the
Click "Build" -> "Rebuild Project" and execute Gradle Build.

Execution

If the build is successful, the program is ready to run. If you have an Android device, you can connect and run the actual device. If you do not have one, please run it on an emulator.
If the execution is successful, the application and execution log will be displayed as shown below.
The Minimum Demo does not show the UI such as backgrounds and gut wheel icons for model switching.

 

 

Execution of Minimum Demo

In addition to the regular samples, this application provides a "Minimum Demo" with only the minimum functions.
It is possible to change the application to run by switching the "build variant".

  1. Click on "Build Variants" in the left corner

2.   Click on Active Build Variants and select "Minimum Debug

 

3. Run Minimum Demo

© 2010 - 2022 Live2D Inc.