Android App Bundle with in-app locale change

后端 未结 2 2122
北荒
北荒 2020-11-29 06:41

I\'ve a problem with AAB when I need to change the app locale from within the app itself(i.e. have the language change setting inside the app), the issue is that the AAB giv

2条回答
  •  忘掉有多难
    2020-11-29 07:00

    Edit:

    The PlayCore API now supports downloading the strings for another language on-demand: https://developer.android.com/guide/app-bundle/playcore#lang_resources

    Alternative solution (discouraged):

    You can disable the splitting by language by adding the following configuration in your build.gradle

    android {
        bundle {
            language {
                // Specifies that the app bundle should not support
                // configuration APKs for language resources. These
                // resources are instead packaged with each base and
                // dynamic feature APK.
                enableSplit = false
            }
        }
    }
    

    This latter solution will increase the size of the app.

提交回复
热议问题