无效的 splitapkbundle。捆绑目标未知语言:[gr]

Jay*_*ani 1 java android gradle android-studio google-play-console

上传应用程序包失败。

在我更改依赖项的版本后

> classpath 'com.android.tools.build:gradle:3.5.0'
Run Code Online (Sandbox Code Playgroud)

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
>     } }
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

Jay*_*ani 5

有两种方法


1) 第一种方法


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

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

defaultConfig {
    ...
    resConfigs "en" }
Run Code Online (Sandbox Code Playgroud)

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
    }
}
Run Code Online (Sandbox Code Playgroud)


归档时间:

查看次数:

1613 次

最近记录:

6 年,1 月 前