Search code examples
bazel

How to set APP_PLATFORM when build android .so library?


How to set APP_PLATFORM for build android ndk library, just like in jni/Application.mk:

APP_PLATFORM := android-17

Solution

  • In your WORKSPACE file, add the api_level attribute:

    android_ndk_repository(
        name = "androidndk",
        api_level = 17,
    )