【问题标题】:Invalid splitapkbundle. The bundle target unknown language: [gr]无效的 splitapkbundle。捆绑目标未知语言:[gr]
【发布时间】:2020-01-12 12:07:40
【问题描述】:

上传应用包失败。

在我更改依赖项的版本之后

> classpath 'com.android.tools.build:gradle:3.5.0'

3.4.1 到 3.5.0

我收到了这个错误。

我用这个方法解决了但是是真是假不知道见下文

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

【问题讨论】:

标签: java android android-studio gradle google-play-console


【解决方案1】:

有两种方法


1) 第一种方法


我用这个方法解决了这个问题,但它只适用于英语

SplitApkBundle 无效。该捆绑包以未知语言为目标:[gr]。

defaultConfig {
    ...
    resConfigs "en" }

2) 第二种方法


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

【讨论】:

    猜你喜欢
    • 2020-01-11
    • 2021-10-27
    • 2016-01-07
    • 2013-08-31
    • 1970-01-01
    • 2015-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多