Skip to content

Android Prerequisites

Taner Sener edited this page Apr 16, 2024 · 14 revisions

1. The following packages are required by the build scripts.

autoconf automake libtool pkg-config curl git doxygen nasm

2. These optional packages should be installed only if you want to build corresponding external libraries.

cmake gcc gperf texinfo yasm bison autogen wget autopoint meson ninja ragel groff gtk-doc-tools libtasn1-1
  • autogen required for libsndfile
  • bison > 2.4, wget, autopoint required for gnutls
  • cmake > 3.9 required by libwebp and x265
  • gcc required by freetype and fribidi
  • gperf required by fontconfig
  • groff required by libiconv
  • gtk-doc-tools required by gnutls
  • libtasn1-1 required by gnutls
  • meson > 0.56, ninja for dav1d
  • ragel required by harfbuzz
  • texinfo required by gmp on some platforms
  • yasm required for libvpx and x265 on some platforms

3. Android builds require these additional packages.

  • Android SDK Build Tools
  • Android NDK r22b or later with LLDB and CMake as shown in Android NDK Guide (See #292 if you want to use NDK r23b or later)

4. Set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT environment variables to point to their exact locations.

  Below, you can see the default paths used by Android Studio on macOS.

taner@localhost> echo $ANDROID_SDK_ROOT
/Users/taner/Library/Android/sdk
taner@localhost>
taner@localhost> ls -l $ANDROID_SDK_ROOT
total 0
drwxr-xr-x  10 taner  staff   320 11 Apr 09:50 build-tools
drwxr-xr-x   3 taner  staff    96 18 Jul  2023 cmake
drwxr-xr-x   3 taner  staff    96 18 Jul  2023 cmdline-tools
drwxr-xr-x@ 31 taner  staff   992 11 Apr 16:20 emulator
drwxr-xr-x   3 taner  staff    96 28 Oct  2021 fonts
drwxr-xr-x   9 taner  staff   288 30 Sep  2021 licenses
drwxr-xr-x   7 taner  staff   224 11 Apr 22:40 ndk
drwxr-xr-x   3 taner  staff    96 30 Sep  2021 patcher
drwxr-xr-x@ 15 taner  staff   480 11 Apr 16:20 platform-tools
drwxr-xr-x   7 taner  staff   224 11 Apr 09:50 platforms
drwxr-xr-x  50 taner  staff  1600 11 Apr 16:31 skins
drwxr-xr-x   4 taner  staff   128 27 Aug  2023 sources
drwxr-xr-x   8 taner  staff   256 11 Apr 16:32 system-images
drwxr-xr-x  14 taner  staff   448 30 Sep  2021 tools
taner@localhost>
taner@localhost> echo $ANDROID_NDK_ROOT
/Users/taner/Library/Android/sdk/ndk/23.2.8568313
taner@localhost>
taner@localhost> ls -l $ANDROID_NDK_ROOT
total 2984
-rw-r--r--   1 taner  staff   11267 26 Aug  2022 CHANGELOG.md
-rw-r--r--   1 taner  staff  592228 26 Aug  2022 NOTICE
-rw-r--r--   1 taner  staff  871226 26 Aug  2022 NOTICE.toolchain
-rw-r--r--   1 taner  staff     730 26 Aug  2022 README.md
drwxr-xr-x  19 taner  staff     608 26 Aug  2022 build
drwxr-xr-x   5 taner  staff     160 26 Aug  2022 meta
-rwxr-xr-x   1 taner  staff      73 26 Aug  2022 ndk-build
-rwxr-xr-x   1 taner  staff      92 26 Aug  2022 ndk-gdb
-rwxr-xr-x   1 taner  staff      92 26 Aug  2022 ndk-lldb
-rwxr-xr-x   1 taner  staff      94 26 Aug  2022 ndk-stack
-rwxr-xr-x   1 taner  staff      94 26 Aug  2022 ndk-which
-rw-r--r--   1 taner  staff   18408 26 Aug  2022 package.xml
drwxr-xr-x   7 taner  staff     224 26 Aug  2022 prebuilt
drwxr-xr-x   7 taner  staff     224 26 Aug  2022 python-packages
drwxr-xr-x   3 taner  staff      96 26 Aug  2022 shader-tools
drwxr-xr-x  25 taner  staff     800 26 Aug  2022 simpleperf
-rw-r--r--   1 taner  staff      51 26 Aug  2022 source.properties
drwxr-xr-x   5 taner  staff     160 26 Aug  2022 sources
drwxr-xr-x   4 taner  staff     128 26 Aug  2022 toolchains
drwxr-xr-x   3 taner  staff      96 26 Aug  2022 wrap.sh
Clone this wiki locally