Native Dependencies in Android Studio 4.0
By Dan Albert, Software Engineer One thing that NDK users struggle with is managing native dependencies: Library authors need to maintain support for both ndk-build and CMake (and hope that their users are using one of those two options and not something else). Libraries don’t always distribute prebuilt binaries for Android, so users must either build the library themselves or rely on (potentially untrustworthy) prebuilt binaries found elsewhere on the web. Android-specific build scripts are often out of date and no longer work. Libraries are sometimes built by a build system that Android doesn’t support. Libraries may not build on the user’s machine. For example, Unix shell scripts won’t run on Windows. Libraries often depend on other libraries, leaving users to chase them down and start the process again. With version 4.0 of the Android Gradle Plugin, we’ve addressed these issues by adding support for distributing and exposing native libraries through the same mechanism that you do f...