From 5f395ab79293cb88c266171a9caf0253592c70fb Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 27 Sep 2026 20:39:11 +0200 Subject: Android: Set abiFilters for ndk Normally, Dolphin APKs have a lib folder that contains two subfolders: arm64-v8a and x86_64. Both contain a libmain.so file, and arm64-v8a also contains additional .so files for libadrenotools. When we added netplay support for Android, we brought in Jetpack Compose as a dependency, which in turn made libandroidx.graphics.path.so be included in Dolphin APKs. Unfortunately, this .so file was included not only for arm64-v8a and x86_64, but also for armeabi-v7a and x86. This made Dolphin installable on devices that use one of these older ABIs, but because libmain.so is missing, trying to start Dolphin on such a device results in an instant crash. We have gotten a number of Google Play reviews from armeabi-v7a users complaining about this crash. This fixes the problem by setting abiFilters under ndk instead of under cmake, as documented at https://developer.android.com/ndk/guides/abis. --- Source/Android/app/build.gradle.kts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/Android/app/build.gradle.kts b/Source/Android/app/build.gradle.kts index 2fc4cb7a94..871f93fcd5 100644 --- a/Source/Android/app/build.gradle.kts +++ b/Source/Android/app/build.gradle.kts @@ -97,6 +97,12 @@ android { namespace = "org.dolphinemu.dolphinemu" defaultConfig { + ndk { + // We only officially support arm64-v8a and x86_64. + // If you want to try building other ABIs anyway, you need -DENABLE_GENERIC=ON. + abiFilters += listOf("arm64-v8a", "x86_64") //, "armeabi-v7a", "x86" + } + externalNativeBuild { cmake { arguments( @@ -105,7 +111,6 @@ android { "-DCMAKE_BUILD_TYPE=RelWithDebInfo" // , "-DENABLE_GENERIC=ON" ) - abiFilters("arm64-v8a", "x86_64") //, "armeabi-v7a", "x86" // Uncomment the line below if you don't want to build the C++ unit tests //targets("main", "hook_impl", "main_hook", "gsl_alloc_hook", "file_redirect_hook") -- cgit v1.2.3