1cb93a386Sopenharmony_ciAndroidKit is an AAR, or Android Library, that compiles Skia's native code, 2cb93a386Sopenharmony_ciJNI bindings, and Java wrapper classes into a shared library. 3cb93a386Sopenharmony_ci 4cb93a386Sopenharmony_ciBUILDING 5cb93a386Sopenharmony_ci 6cb93a386Sopenharmony_ci1) Through Android Studio 7cb93a386Sopenharmony_ci- Start a project by opening skia/platform_tools/android/apps with Android Studio. 8cb93a386Sopenharmony_ci- Ensure that you're local.properties file is filled out with paths to your 9cb93a386Sopenharmony_ci Skia out directories. It should look like this: 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci sdk.dir=[sdk file path] 12cb93a386Sopenharmony_ci depot_tools.dir=[depot tools file path] 13cb93a386Sopenharmony_ci x86.out.dir=[out file for x86] 14cb93a386Sopenharmony_ci x64.out.dir=[out file for x64] 15cb93a386Sopenharmony_ci arm64.out.dir=[out file for xarm64] 16cb93a386Sopenharmony_ci arm.out.dir=[out file for arm] 17cb93a386Sopenharmony_ci 18cb93a386Sopenharmony_ci- Click on AndroidKit on the project tree, click Build in the toolbar, and select 19cb93a386Sopenharmony_ci " Make Module 'apps.androidkit' " 20cb93a386Sopenharmony_ci- The AAR will be under the build/outputs/aar directory. 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ci2) Through the terminal 23cb93a386Sopenharmony_ci- Run: platform_tools/android/bin/android_build_app -C out/[out_dir] androidkit 24cb93a386Sopenharmony_ci- If it builds with no errors, you’ll find the AAR in the out directory you were building from 25cb93a386Sopenharmony_ci 26cb93a386Sopenharmony_ci 27cb93a386Sopenharmony_ciLOADING 28cb93a386Sopenharmony_ci 29cb93a386Sopenharmony_ciBefore using AndroidKit classes, client applications must explicitly load the native library. 30cb93a386Sopenharmony_ciThis is usually accomplished via a static class initializer, e.g. 31cb93a386Sopenharmony_ci 32cb93a386Sopenharmony_ci public class MyApp { 33cb93a386Sopenharmony_ci static { 34cb93a386Sopenharmony_ci System.loadLibrary("androidkit"); 35cb93a386Sopenharmony_ci } 36cb93a386Sopenharmony_ci 37cb93a386Sopenharmony_ci ... 38cb93a386Sopenharmony_ci } 39cb93a386Sopenharmony_ci 40