Playstore 中的 Apk 上传错误 - 64 位警告

Apk Upload error in playstore - 64 bit warning

我正在使用此实现:'com.google.vr:sdk-panowidget:1.160.0' 以显示 360 度图像,但出现以下错误;将应用上传到 Play 商店时:

Error
This release is not compliant with the Google Play 64-bit requirement

The following APKs or App Bundles are available to 64-bit devices,
 but they only have 32-bit native code: 130.

Include 64-bit and 32-bit native code in your app. Use 
the Android App Bundle publishing format to automatically
ensure that each device architecture receives 
only the native code that it needs. 
This avoids increasing the overall size of your app. Learn More

注意:该库未创建 lib/x86_64.so 文件。

请帮忙!

Starting August 1, 2019:

  • All new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play.
  • Extensions: Google Play will continue to accept 32-bit only updates to existing games that use the following SDKs:

    • Corona Labs SDK - until August 2020
    • Adobe Air software and the AIR SDK - until August 2020
    • Unity 5.6.7 or older - until August 2021

有关详细信息,请参阅 https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html

我的应用程序遇到了同样的问题,这对我有用。

我正在使用 AAB 格式上传应用程序,我的 build.gradle 具有以下架构目标:"armeabi-v7a"、"arm64-v8a, "x86"、"x86_64"。 但是在构建项目之后,AAB 内部并没有创建 'x86_64' 文件夹。所以我决定删除 'x86' 和 'x86_64' 现在我的 build.graddle 看起来像这样

     defaultConfig {
        ...
        ndk {
            abiFilters  "armeabi-v7a", "arm64-v8a"
        }
        ...
     }
     splits {
        abi {
            ...
            include  "armeabi-v7a", "arm64-v8a"
        }
     }
     applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "arm64-v8a":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
     }

这让我可以在 google Playstore 发布任何问题。 希望对您有所帮助!

注意:请注意,删除目标架构会导致目标设备减少,正如@UzairAslam 在下面的评论中所说。因此,请尝试了解此解决方法是否适合您的项目需求。

检查分析。步骤是 Here。 按照步骤生成 apk 后,上传到 Play 商店时会出现同样的错误。

在上传到 Play 商店之前,请检查您的 apk 是否支持 64 位架构。按照 Here 给出的说明进行操作并进行检查。特别按照link.

中提到的Using Bundletool

提示: 在使用捆绑工具时。将您的 jks、aab 和构建工具 jar 文件保存在同一文件夹中。

如果您仍然在命令提示符中收到警告,如“警告:App Bundle 包含禁用的 32 位 RenderScript 位码文件 (.bc) es Android 中的 64 位支持。 gener 中不包含 64 位本机库 已安装 APK。”然后您需要检查您的代码。

可能的情况是,您可以将项目添加为模块并且可能具有本机代码。那么如何检查你的项目是否有本地代码。为此检查每个模块中的 res/raw 文件夹。它可能有 *.bc 文件。如果您的模块正在使用任何脚本 files/classes.

,请尝试更新模块 gradle 文件中的 renderscriptTargetApi

如果问题得到解决,那么您可能不会在任何文件夹中看到 *.bc 文件,然后在命令提示符中再次检查是否支持 64 位。如果您没有收到任何警告,那么您就可以开始部署了。

我也有同样的问题,因为库中没有 x86_64.so 文件,但它正在生成“armeabi-v7a”、“arm64-v8a”和“x86”.so 文件,我简单地解决了通过更新库解决问题 我有 'org.adblockplus:adblock-android-webview:3.14',我刚更新到 3.16 问题就解决了。 因此,请检查您的库文档并注意有时文档不包含升级版本,您必须点击并尝试(例如从 3.14 更改为 3.15 或 3.16)以获取最新版本。