无法在我的项目中生成x64版本的apk
根据新的Play商店政策*将于8月生效*我需要确保我的应用不仅提供32位版本,而且还提供64位版本,但当我尝试生成该版本时通过NDK,我总是得到相同的库.经过反复尝试,我刚收到一个没有任何"lib"文件夹的apk.
According to the new Play Store policy * that will take effect in August * I need to ensure that my app provides not only the 32-bit version, but also a 64-bit version, but when I try to generate that version through NDK, I always get the same libs. After trying and trying and trying, I just received an apk without any kind of "lib" folder.
我尝试在gradle上设置带有abiFilters的NDK,但没有任何更改...
I've tried to set NDK with abiFilters on gradle and got no changes...
defaultConfig {
applicationId "com.myproject.supermidia"
minSdkVersion 17
targetSdkVersion 26
versionCode 20192201
versionName "2.4"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
为了为ARM(和x86
仿真器)构建,拆分应该看起来像这样. x86_64
可能没什么用,因为x86_64
模拟器很慢并且没有我知道的硬件...
In order to build for ARM (and the x86
emulator), the splits should look alike this. x86_64
might be a little useless, because the x86_64
emulator is slow and there is no hardware I'd be aware of ...
android {
defaultConfig {
...
externalNativeBuild {
cmake {
arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_CPP_FEATURES=rtti exceptions"
}
}
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
}
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86"
universalApk true
}
}
}