Android Google Play 64位要求应用程序捆绑包更新失败

Android Google Play 64位要求应用程序捆绑包更新失败,android,32bit-64bit,android-app-bundle,Android,32bit 64bit,Android App Bundle,我们正准备像往常一样更新我们的应用程序,但现在谷歌强制要求这些应用程序与32位和64位体系结构兼容。我尝试过不同的解决方案,但在所有情况下,我都在下面的屏幕截图中遇到了这个错误 这是我最后的解决办法 defaultConfig { ... ndk { abiFilters "armeabi-v7a", "arm64-v8a" } } def enableSeparateBuildPerCPUArchitecture = false splits {

我们正准备像往常一样更新我们的应用程序,但现在谷歌强制要求这些应用程序与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\u 64'
集:

universalApk true
为了将这两种体系结构都包含在通用APK(而不是应用程序包)中。包括
x86
和/或
x86_64
仅对调试版本(emulator)有用,但它会使用无用的本机程序集扩充发布版本


但对于应用程序包,请参见:

将忽略拆分块

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

默认情况下,它会根据abi进行拆分,但也需要同时拆分两个abi。因此:

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
*。这样甚至可以构建
(可以进行大量配置,但它根本不关心缺少的库,直到它无法链接它们为止)。从
armeabi
加载库不被接受为“64位支持”(已尝试过)。

谢谢@Martin Zeitler我尝试了上述解决方案,但仍然无法发布apk或捆绑包。使用bundle,它只显示了播放控制台armeabi-v7a上的一个平台,而使用apk analyzer,它显示了libs arm64-v8a、armeabi-v7a下的两个文件夹。通过使用apk,它显示了两个平台arm64-v8a、armeabi-v7a,但仍然无法继续推出apk。
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
        }
    }