Android 无法在Google play Store中上载64位版本

Android 无法在Google play Store中上载64位版本,android,android-studio,build.gradle,32bit-64bit,google-play-console,Android,Android Studio,Build.gradle,32bit 64bit,Google Play Console,根据谷歌最近的政策变化,我们正在尝试上传64位和32位版本 我们在Build.gradle中包含了相应的abifilter“ndk.abiFilters‘armeabi-v7a’、‘arm64-v8a’、‘x86’、‘x86_64’” 我们能够生成构建,但是当我们上传构建到游戏控制台进行Beta测试时。它发出警告说“版本不符合64位谷歌要求”。 我们尝试了所有方法,生成了4个版本(x86、x86\u 64、armeabi-v7a、arm64-v8a),生成了两个版本或上载了带有所有abifil

根据谷歌最近的政策变化,我们正在尝试上传64位和32位版本

我们在Build.gradle中包含了相应的abifilter“
ndk.abiFilters‘armeabi-v7a’、‘arm64-v8a’、‘x86’、‘x86_64’

我们能够生成构建,但是当我们上传构建到游戏控制台进行Beta测试时。它发出警告说“版本不符合64位谷歌要求”。

我们尝试了所有方法,生成了4个版本(
x86、x86\u 64、armeabi-v7a、arm64-v8a
),生成了两个版本或上载了带有所有abifilter的通用版本,它给出了相同的警告。我们尝试了所有可能的方法

请帮助我们将构建上传到Play store的完美步骤,或者如果我们在生成构建时出错,请务必让我们知道这一点

请检查build.gradle代码:

     {
         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'
      }
此外,我们还尝试了下面给出的另一种方法:

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

首先,您将Universal APK设置为False

跟随这个梯度

使用该方法可避免这些错误。
您的应用程序将由谷歌为所有类型的设备构建。

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

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

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

并更新构建梯度,以便存储库指向本地maven repo:

repositories {
   mavenLocal()
}
然后编译正确的库:

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
使用渐变配置:

ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' // For your flavor or defaultConfig 
遵循这些步骤将生成两个版本,一个为32位,另一个为64位,这样做还将帮助您避免出现诸如“完全阴影apk之类的错误


希望这有帮助

我解决了我的问题很简单,你不需要mvn安装:安装文件

只需进入下载页面

https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/21.51.546.7/
下载图书馆2

1-32位

2-64位


xwalk_core_library-21.51.546.7-arm64.aar
还有这个 xwalk_core_库-21.51.546.7-x86.aar

下载后,您需要使用winrar打开文件

取出x86 libart并添加到arm64文件

现在我们在32位和64位文件上有两个库

现在将此库添加到android Stidou

文件-new-newmodule-jar/aar

添加你的库

之后

在项目中添加库

在你的身体里

 defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 17
        versionName "3.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled = true
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' ,'x86_64'
        }
就这些

apk分析是的,您有2个库32位和64位,现在您可以更新应用程序了


谢谢你的回复,但即使我说universalApk=false,如果我使用这64位版本中的任何一个,我仍然会生成4个版本,它显示相同的警告。首先比较我的gradle和你的gradle,然后在告诉我它完全相同之后做一些更改,只是universalApk标志不同。您没有lint选项并从默认配置中删除ndk.abifilter如果是,则在应用程序中使用任何本机代码,因此必须使用ndk.abifilter,否则不需要ndkfilter。感谢回复,但由于应用程序的复杂性,我们将无法使用Android应用程序捆绑方法。我投票将此问题作为离题回答,因为这可能是目前最干净的解决方法,特别是因为除非您想进行多个APK构建,否则不支持此方法。有趣的是,我在使用同一个xwalk库的遗留项目中遇到了这个问题,所以这个答案救了我一天!
https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/21.51.546.7/
 defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 17
        versionName "3.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled = true
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' ,'x86_64'
        }