blob: a385a7a672f4e7cf8e09bf44bcb3704d4782f0de [file] [log] [blame]
Jorge Betancourt265e3e12021-04-08 15:27:13 -04001AndroidKit is an AAR, or Android Library, that compiles Skia's native code,
2JNI bindings, and Java wrapper classes into a shared library.
3
Florin Malita2a650cc2021-04-12 13:38:44 -04004BUILDING
Jorge Betancourt265e3e12021-04-08 15:27:13 -04005
61) Through Android Studio
7- Start a project by opening skia/platform_tools/android/apps with Android Studio.
8- Ensure that you're local.properties file is filled out with paths to your
9 Skia out directories. It should look like this:
10
11 sdk.dir=[sdk file path]
12 depot_tools.dir=[depot tools file path]
13 x86.out.dir=[out file for x86]
14 x64.out.dir=[out file for x64]
15 arm64.out.dir=[out file for xarm64]
16 arm.out.dir=[out file for arm]
17
18- Click on AndroidKit on the project tree, click Build in the toolbar, and select
19 " Make Module 'apps.androidkit' "
20- The AAR will be under the build/outputs/aar directory.
21
222) Through the terminal
23- Run: platform_tools/android/bin/android_build_app -C out/[out_dir] androidkit
24- If it builds with no errors, youll find the AAR in the out directory you were building from
25
Florin Malita2a650cc2021-04-12 13:38:44 -040026
27LOADING
28
29Before using AndroidKit classes, client applications must explicitly load the native library.
30This is usually accomplished via a static class initializer, e.g.
31
32 public class MyApp {
33 static {
34 System.loadLibrary("androidkit");
35 }
36
37 ...
38 }
39