The minSdkVersion
attribute means that the library was designed without considering the API levels lower than that value. The developers didn't pay attention if a method or a field is unavailable on API level lower than 15, and this is the method to inform you.
For example the field THREAD_POOL_EXECUTOR
used in the method getExecutor is available only from API level 11:
public static Executor getExecutor() {
synchronized (LOCK) {
if (FacebookSdk.executor == null) {
FacebookSdk.executor = AsyncTask.THREAD_POOL_EXECUTOR;
}
}
return FacebookSdk.executor;
}
In version 4.5.1 the getExecutor method is different and supports also API level 9:
public static Executor getExecutor() {
synchronized (LOCK) {
if (FacebookSdk.executor == null) {
Executor executor = getAsyncTaskExecutor();
if (executor == null) {
executor = new ThreadPoolExecutor(
DEFAULT_CORE_POOL_SIZE, DEFAULT_MAXIMUM_POOL_SIZE, DEFAULT_KEEP_ALIVE,
TimeUnit.SECONDS, DEFAULT_WORK_QUEUE, DEFAULT_THREAD_FACTORY);
}
FacebookSdk.executor = executor;
}
}
return FacebookSdk.executor;
}
In conclusion you shouldn't use the last version of the Facebook SDK but you should stick with the last compatible version (4.5.0).
The change in minApk version is shown in the upgrade log below: -
https://developers.facebook.com/docs/android/upgrading-4.x.
and the release of interest is below
https://github.com/facebook/facebook-android-sdk/releases?after=sdk-version-4.8.1