diff --git a/android/app/src/main/java/com/arthenica/mobileffmpeg/AbiDetect.java b/android/app/src/main/java/com/arthenica/mobileffmpeg/AbiDetect.java index af59120be..816e0ee17 100644 --- a/android/app/src/main/java/com/arthenica/mobileffmpeg/AbiDetect.java +++ b/android/app/src/main/java/com/arthenica/mobileffmpeg/AbiDetect.java @@ -20,6 +20,7 @@ package com.arthenica.mobileffmpeg; import android.os.Build; +import android.util.Log; /** *

This class is used to detect running ABI name using Android's cpufeatures @@ -35,7 +36,16 @@ public class AbiDetect { /* LOAD NOT-LOADED LIBRARIES ON API < 21 */ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - System.loadLibrary("cpufeatures"); + try { + System.loadLibrary("c++_shared"); + } + catch (UnsatisfiedLinkError ex) { + Log.i(Config.TAG, "libc++_shared.so fialed to load, try to proceed without it"); + } + System.loadLibrary("ndk_compat"); + System.loadLibrary("avutil"); + System.loadLibrary("swresample"); + System.loadLibrary("avcodec"); } System.loadLibrary("mobileffmpeg_abidetect"); diff --git a/android/app/src/main/java/com/arthenica/mobileffmpeg/Config.java b/android/app/src/main/java/com/arthenica/mobileffmpeg/Config.java index 15bb631d3..88a69454b 100644 --- a/android/app/src/main/java/com/arthenica/mobileffmpeg/Config.java +++ b/android/app/src/main/java/com/arthenica/mobileffmpeg/Config.java @@ -84,12 +84,13 @@ public class Config { /* LOAD NOT-LOADED LIBRARIES ON API < 21 */ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - final List externalLibrariesEnabled = getExternalLibraries(); - if (externalLibrariesEnabled.contains("tesseract") || externalLibrariesEnabled.contains("x265") || externalLibrariesEnabled.contains("snappy") || externalLibrariesEnabled.contains("openh264") || externalLibrariesEnabled.contains("rubberband")) { - // libc++_shared.so included only when tesseract or x265 is enabled + try { System.loadLibrary("c++_shared"); } - System.loadLibrary("cpufeatures"); + catch (UnsatisfiedLinkError ex) { + Log.i(Config.TAG, "libc++_shared.so fialed to load, try to proceed without it"); + } + System.loadLibrary("ndk_compat"); System.loadLibrary("avutil"); System.loadLibrary("swscale"); System.loadLibrary("swresample");