I read in the docs here that the ANDROID_SDK_ROOT environment variable will be set to the NDK directory. However, the same variable is used (but deprecated) by Android Studio. In the case of Android Studio, the same variable refers to the SDK dir, instead of the NDK dir.
I suggest to change F-droid to use a different variable name for the NDK, because it is confusing to use the same variable name for different directories.