FAQ for Android
How does the elepay Android SDK support Google Play's 16KB requirement?
The elepay Android SDK already supports the 16KB alignment requirement; however, APKs for the x86_64 architecture require separate handling. Since there are almost no physical x86_64 devices in the market, please exclude x86_64 using the following approach:
android {
defaultConfig {
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a") // Remove "x86_64"
}
}
}If the app still encounters Google Play 16KB alignment issues, please follow the steps below to confirm whether it is caused by other third-party dependencies in the app:
1. > ./gradlew :app:assembleDebug
// The packaged APK is located at: app/build/outputs/apk/debug/xxx.apk
2. > check_elf_alignment.sh xxx.apk
// The sh script can be obtained from Google's official site: https://developer.android.com/guide/practices/page-sizes#elf-alignmentA portion of the elepay Android SDK output is shown below, which meets Google Play's 16KB alignment requirement.
=== ELF alignment ===
....../lib/armeabi-v7a/libentryexpro.so: \e[31mUNALIGNED\e[0m (2**12)
....../lib/armeabi-v7a/libsurface_util_jni.so: \e[32mALIGNED\e[0m (2**14)
....../lib/armeabi-v7a/libmlkit_google_ocr_pipeline.so: \e[31mUNALIGNED\e[0m (2**12)
....../lib/armeabi-v7a/libtensorflowlite_jni.so: \e[31mUNALIGNED\e[0m (2**12)
....../lib/armeabi-v7a/libimage_processing_util_jni.so: \e[32mALIGNED\e[0m (2**14)
....../lib/armeabi-v7a/libuptsmaddon.so: \e[31mUNALIGNED\e[0m (2**12)
....../lib/arm64-v8a/libentryexpro.so: \e[32mALIGNED\e[0m (2**16)
....../lib/arm64-v8a/libsurface_util_jni.so: \e[32mALIGNED\e[0m (2**14)
....../lib/arm64-v8a/libmlkit_google_ocr_pipeline.so: \e[32mALIGNED\e[0m (2**14)
....../lib/arm64-v8a/libtensorflowlite_jni.so: \e[32mALIGNED\e[0m (2**16)
....../lib/arm64-v8a/libimage_processing_util_jni.so: \e[32mALIGNED\e[0m (2**14)
....../lib/arm64-v8a/libuptsmaddon.so: \e[32mALIGNED\e[0m (2**16)
\e[31mFound 4 unaligned libs (only arm64-v8a/x86_64 libs need to be aligned).\e[0m
=====================Last updated on