无法在Google Play商店中上传64位版本 [英] Not able to Upload 64-bit build in Google play Store

查看:419
本文介绍了无法在Google Play商店中上传64位版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试上传64位&根据最近的Google政策更改,版本为32位。

We are trying to upload the 64bit & 32bit build, according to the recent Google policy change.

我们分别包含了abifilter ndk.abiFilters'armeabi-v7a','arm64-v8a','x86','x86_64'

We have included respective abifilter "ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'" in the Build.gradle.

我们能够生成内部版本,但是当我们将内部版本上传到Play控制台进行Beta审核时。它会发出警告,说明 发行版不符合64位Google要求

We were able to generate the build but when we upload the build to Play console for Beta review. It gives a warning saying "Release is not compliant with 64-bit Google Requirement".

我们尝试了所有方法,生成了4个版本( x86,x86_64, armeabi-v7a,arm64-v8a ),生成两个版本或使用所有abifilter上传通用版本,都会发出相同的警告。我们尝试了所有可能的方法。

We tried all approach, generating 4 builds (x86,x86_64,armeabi-v7a,arm64-v8a), generating two builds or uploading the universal build with all abifilter, it gives the same warning. We tried all possible approaches.

请在将构建文件上传到Play商店的完美步骤中为我们提供帮助,否则,如果在生成构建文件时遇到任何错误,也请告知我们。

Please help us out in perfect steps of uploading the build to Play store or if we are making any mistake in generating the build please do let us know on that ends also.

请检查build.gradle代码:

Please check the build.gradle code:

     {
         minSdkVersion 19
         applicationId 'com.xxx.xxx'
         targetSdkVersion 28
         testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
         versionCode 32 // 27-30
         versionName '1.2.1'
         ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
         proguardFile 'proguard-android.txt'
      }

此外,我们尝试了以下另一种方法:

Also, we tried with another approach given below:

  splits {
    // Configures multiple APKs based on ABI.
    abi {
        // Enables building multiple APKs per ABI.
        enable true
        // By default all ABIs are included, so use reset() and include to specify that we only
        // want APKs for x86 and x86_64.
        // Resets the list of ABIs that Gradle should create APKs for to none.
        reset()
        // Specifies a list of ABIs that Gradle should create APKs for.
        include "x86", "x86_64", "arm64-v8a", "armeabi-v7a"

        // Specifies that we do not want to also generate a universal APK that includes all ABIs.
        universalApk true
    }
}



ext.abiCodes = ["x86": 1, "x86_64": 2, "armeabi-v7a": 3, "arm64-v8a": 4]

import com.android.build.OutputFile

// For each APK output variant, override versionCode with a combination of
// ext.abiCodes * 1000 + variant.versionCode. In this example, variant.versionCode
// is equal to defaultConfig.versionCode. If you configure product flavors that
// define their own versionCode, variant.versionCode uses that value instead.
android.applicationVariants.all { variant ->

// Assigns a different version code for each output APK
// other than the universal APK.
variant.outputs.each { output ->

    // Stores the value of ext.abiCodes that is associated with the ABI for this variant.
    def baseAbiVersionCode =
            // Determines the ABI for this variant and returns the mapped value.
            project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))

    // Because abiCodes.get() returns null for ABIs that are not mapped by ext.abiCodes,
    // the following code does not override the version code for universal APKs.
    // However, because we want universal APKs to have the lowest version code,
    // this outcome is desirable.
    if (baseAbiVersionCode != null) {

        // Assigns the new version code to versionCodeOverride, which changes the version code
        // for only the output APK, not for the variant itself. Skipping this step simply
        // causes Gradle to use the value of variant.versionCode for the APK.
        output.versionCodeOverride =
                baseAbiVersionCode * 1 + variant.versionCode
    }
}
}


推荐答案

经过几天的努力,在这里找到了可行的解决方案: diego.org

After a couple of days of struggle found the working solution here: diego.org

如果您需要64位库,首先需要从源站点(相应的库站点)下载正确的库。检查您是否正在使用其64位库可用的库版本。

Basically, if you need the 64-bit library you first need to download the correct library from the source site(Respective library site). Check whether you are using the version of the Library whose 64-bit library is available or not.

然后将其安装到本地Maven存储库(基本上,您的本地Maven将用于生成64位apk):

Then install it to the local maven repository(Basically your Local Maven will be used in generating the 64-bit apk's):

mvn install:install-file -DgroupId= (library group for e.g.org.xwalk) -DartifactId= (library name for e.g.xwalk_core_library) \
-Dversion=(version no for e.g.23.53.589.4-64bit) -Dpackaging=aar  \
-Dfile=(file name for e.g.xwalk_core_library-23.53.589.4-64bit.aar) \
-DgeneratePom=true

并更新构建版本,以便存储库指向本地Maven存储库:

And update your build gradle so that the repositories point to your local maven repo:

repositories {
   mavenLocal()
}

,然后编译正确的lib:

and you compile the correct lib:

compile 'org.xwalk:xwalk_core_library:23.53.589.4' // Use this library for generating "armeabi-v7a" & "x86" build
compile 'org.xwalk:xwalk_core_library:23.53.589.4-64bit' // Use this library for generating "arm64-v8a" & "x86_64" build

使用gradle Config:

Use the gradle Config:

ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' // For your flavor or defaultConfig 

执行以下步骤将生成两个版本,一个版本为 32bit ,另一个版本为 64bit ,这些还可以帮助您避免出现诸如 完全阴影的apk 之类的错误。

Following these steps will generate two builds one with 32bit and another with 64bit, doing these will also help you to avoid errors like "Fully Shadowed apk"

希望这会有所帮助。

这篇关于无法在Google Play商店中上传64位版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆