From 4cf28d0ad00b31937287f6166b83b5f4900e427e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=A1=A0=E1=A0=B5=E1=A1=A0=E1=A1=B3=20=E1=A1=A0=E1=A0=B5?= =?UTF-8?q?=E1=A1=A0=20=E1=A0=AE=E1=A0=A0=E1=A0=A8=E1=A1=A9=E1=A0=8B?= =?UTF-8?q?=E1=A0=A0=E1=A0=A8?= <125150101+UjuiUjuMandan@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:21:58 +0800 Subject: [PATCH] Fix split apk (#4165) --- V2rayNG/app/build.gradle.kts | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/V2rayNG/app/build.gradle.kts b/V2rayNG/app/build.gradle.kts index abe716ab..ed58a8a0 100644 --- a/V2rayNG/app/build.gradle.kts +++ b/V2rayNG/app/build.gradle.kts @@ -16,23 +16,22 @@ android { versionName = "1.9.26" multiDexEnabled = true + val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';') splits { abi { isEnable = true - include( - "arm64-v8a", - "armeabi-v7a", - "x86_64", - "x86" - ) - isUniversalApk = true - } - } - - val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';') - if (abiFilterList != null) { - ndk { - abiFilters.addAll(abiFilterList) + reset() + if (abiFilterList != null && abiFilterList.isNotEmpty()) { + include(*abiFilterList.toTypedArray()) + } else { + include( + "arm64-v8a", + "armeabi-v7a", + "x86_64", + "x86" + ) + } + isUniversalApk = abiFilterList.isNullOrEmpty() } }