我已将我的应用程序更新为新的Android应用程序捆绑包。我已经在内部测试轨道中上传了一个新的App Bundle。
现在,当我向手机添加新语言时,它不会像我们期望的那样下载与我的应用程序相关的语言。
是否指定了何时下载新语言?
提前感谢。
首先,您需要在应用中添加播放核心依赖项。并遵循示例代码1,请求语言模块
val manager = SplitInstallManagerFactory.create(this)
// Skip loading if the module already is installed. Perform success action directly.
if (manager.installedModules.contains(targetLocalName)) {
onSuccessfulLoad(targetLocalName)
return
}
val request = SplitInstallRequest.newBuilder()
.addModule(targetLocalName)
.build()
// Load and install the requested feature module.
manager.startInstall(request)
在您的应用程序和活动中安装拆分
覆盖有趣的attachBaseContext(newBase:Context){ val ctx = LanguageHelper.getLanguageConfigurationContext(newBase) super.attachBaseContext(ctx) SplitCompat.installActivity(this)}
您应该参考文档和动态捆绑包演示doc