APK完全被多个ABI APK遮盖 [英] APK completely shadowed with multiple ABI APKs

查看:110
本文介绍了APK完全被多个ABI APK遮盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:尝试将"v7a" ABI版本代码降低到前缀4(低于5,即"v8"),没有任何运气

UPDATE: tried lowering "v7a" ABI versionCode to prefix 4 (lower than 5 which is "v8") without any luck

目前,我的应用程序处于Alpha阶段.每个APK都是由相同的ABI拆分和每个ABI(包括代码)的相同版本乘法生成的,分别生成到"armeabi-v7a"和"arm64-v8a".到目前为止,即使我仅上传了"v8a" APK.现在,当我尝试上传"v7a"时,我从Google Play控制台收到以下错误:

Currently my app is in Alpha stage. Every APK was generated by the same ABI split and the same version multiplication for each ABI (code included), to both "armeabi-v7a", and to "arm64-v8a". Even though I have uploaded only "v8a" APK until now. Now when I'm trying to upload the "v7a" I'm getting the following error from google play console:

问题: 此APK将不提供给任何用户,因为它被一个或多个具有更高版本代码的APK完全遮盖了. 解析度: 从您的发行版中删除此APK,或查看此发行版中包含的APK的定位和版本代码.

Problem: This APK will not be served to any users because it is completely shadowed by one or more APKs with higher version codes. Resolution: Remove this APK from your release or review the targeting and version codes of the APKs that you are including in this release.

android {
compileSdkVersion 26

buildToolsVersion '28.0.3'

defaultConfig {
    multiDexEnabled true
    minSdkVersion 21
    versionCode 28
    versionName "1.36"
    targetSdkVersion 26
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    if (nativeBuildSystem == 'cmake') {
        externalNativeBuild {
            cmake {
                arguments '-DANDROID_TOOLCHAIN=gcc', '-DANDROID_STL=gnustl_static'
            }
        }
    }

}

if (nativeBuildSystem == 'cmake') {
    externalNativeBuild {
        cmake {
            path './jni/CMakeLists.txt'
        }
    }
}

// special for TFLite without it we will get an error when trying
// to use 'detect.tflite' assets file
aaptOptions {
    noCompress "tflite"
}

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


lintOptions {
    abortOnError false
}

sourceSets {
    main {
        if (nativeBuildSystem == 'bazel' || nativeBuildSystem == 'makefile') {
            // TensorFlow Java API sources.
            java {
                srcDir '../../java/src/main/java'
                exclude '**/examples/**'
            }

            // Android TensorFlow wrappers, etc.
            java {
                srcDir '../../contrib/android/java'
            }
        }
        // Android demo app sources.
        java {
            srcDir 'src'
        }

        manifest.srcFile 'AndroidManifest.xml'
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = [project.ext.ASSET_DIR]
    }

    androidTest {
        java.srcDirs = ['src/androidTest/java', 'src']
    }

    debug.setRoot('build-types/debug')
    release.setRoot('build-types/release')
}

}

版本代码分隔:

ext.versionCodes = ['arm64-v8a': 5, 'armeabi-v7a': 6]

import com.android.build.OutputFile


android.applicationVariants.all { variant ->
// assign different version code for each output
    variant.outputs.each { output ->

        def abiFilter = output.getFilter(OutputFile.ABI)
        def abiMultiplier = 0
        if (abiFilter != null) {
            abiMultiplier = (int) project.ext.versionCodes.get(abiFilter)
        }

        output.versionCodeOverride = (int) abiMultiplier * 1000 + (int) android.defaultConfig.versionCode
    }
}

还附有来自游戏机的屏幕截图.似乎"v7a" APK的版本正在遮盖"v8",好像游戏机似乎并没有区分它们之间的体系结构.每个APK的描述都说APK支持两个平台,这一事实也支持了该假设.

Also attached screenshots from play console. It seems that the version of "v7a" APK is shadowing the "v8" as if the play console doesn't seem to differentiate the architectures between them. This hypothesis is also supported by the fact that the description of every APK both say that APK supports both of the platforms.

推荐答案

arm64-v8a APK的versionCode应该高​​于armeavi-v7a APK的versionCode.

The versionCode of the arm64-v8a APK should be higher than the versionCode of the armeavi-v7a APK.

要确定要提供哪个APK,Play会选择与给定设备兼容的最高versionCode.由于所有支持64位(arm64-v8a)的设备也都支持32位(armeabi-v7a),因此,如果您将32位APK放置在更高版本的代码中,则它也将与64位设备匹配,因此可以使用其中的一个而不是64位的这就是Play告诉您arm64-v8a阴影的原因.

To determine which APK is served, Play picks the highest versionCode that is a compatible with the given device. Because all devices supporting 64 bits (arm64-v8a) also support 32 bits (armeabi-v7a), if you put the 32-bit APK with a higher versionCode, it will also match for 64-bits devices and thus that one will be served instead of the 64-bits one. That's why Play tells you that the arm64-v8a is shadowed.

希望有帮助.

这篇关于APK完全被多个ABI APK遮盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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