Can't generate x64 version of apks in my project

情到浓时终转凉″ 提交于 2019-12-11 15:00:07

问题


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.

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
}

回答1:


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
        }
    }
}


来源:https://stackoverflow.com/questions/56351247/cant-generate-x64-version-of-apks-in-my-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!