繁体   English   中英

Google Play 64 位要求 App bundle 更新失败

[英]Google Play 64-bit requirement App bundle failed to update

我们很想像往常一样更新我们的应用程序,但现在谷歌强制要求应用程序与 32 位和 64 位架构兼容。 我尝试了不同的解决方案,但在所有情况下,我在屏幕截图中都遇到了这个错误。 在此处输入图像描述

这是我的最后一个解决方案

defaultConfig {
    ...
    ndk {
        abiFilters  "armeabi-v7a", "arm64-v8a"
    }
}

def enableSeparateBuildPerCPUArchitecture = false
splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false
        include  "armeabi-v7a", "arm64-v8a"
    }
}

我也试过这个ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

放:

universalApk true

为了将两种架构都包含在通用 APK(不是 App Bundle)中。 包括x86和/或x86_64仅对调试构建(仿真器)有用,但它使用无用的本机程序集使发布构建膨胀。


但对于 App Bundle,请参阅基本模块构建配置

splits 块被忽略

在构建应用程序包时,Gradle 会忽略android.splits块中的属性。 如果您想控制您的 app bundle 支持哪些类型的配置 APK,请改用android.bundle来禁用配置 APK 的类型。

它默认按abi它也需要*.so

android {

    // When building Android App Bundles, the splits block is ignored.
    splits {...}

    // Instead, use the bundle block to control which types of configuration APKs
    // you want your app bundle to support.
    bundle {
        language {
            // Specifies that the app bundle should not support
            // configuration APKs for language resources. These
            // resources are instead packaged with each base and
            // dynamic feature APK.
            enableSplit = false
        }
        density {
            // This property is set to true by default.
            enableSplit = true
        }
        abi {
            // This property is set to true by default.
            enableSplit = true
        }
    }
}

ndk build 也已被弃用,使用cmake ...并确保arm64-v8a *.so甚至已构建(可以配置很多,但它最不关心缺少的库,直到它无法链接它们)。 armeabi加载库不被接受为“64 位支持”(已经尝试过)。

defaultConfig {
    ...

    ndk {
        abiFilters "arm64-v8a", "armeabi-v7a"
    }

}

bundle {
        density {
            // Different APKs are generated for devices with different screen densities; true by default.
            enableSplit true
        }
        abi {
            // Different APKs are generated for devices with different CPU architectures; true by default.
            enableSplit true
        }
        language {
            // This is disabled so that the App Bundle does NOT split the APK for each language.
            // We're gonna use the same APK for all languages.
            enableSplit false
        }
    }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM