splitapkbundle 无效。包目标未知语言:[gr]

Invalid splitapkbundle. The bundle target unknown language: [gr]

上传应用程序包失败。

更改依赖项版本后

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

有两种方法


1) first methods


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

SplitApkBundle 无效。该捆绑包针对未知语言:[gr].

defaultConfig {
    ...
    resConfigs "en" }

2) second method


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