SplitInstallErrorCode.MODULE_UNAVAILABLE
尝试安装动态模块时出现以下错误。我已经在使用 Google Play 内部应用程序共享来测试aab
文件,但仍然可以得到它。
这是动态功能清单文件:
<dist:module
dist:title="@string/module_investment">
<dist:delivery>
<dist:on-demand />
</dist:delivery>
<dist:fusing dist:include="true" />
</dist:module>
这是我开始下载的方式:
private val moduleInvestment by lazy { getString(R.string.module_investment) }
splitInstallRequest = SplitInstallRequest
.newBuilder()
.addModule(moduleInvestment)
.build()
splitInstallManager.startInstall(splitInstallRequest)
.addOnSuccessListener { sessionId -> mySessionId = sessionId }
.addOnFailureListener { exception ->
when ((exception as SplitInstallException).errorCode) {
SplitInstallErrorCode.NETWORK_ERROR -> {
}
SplitInstallErrorCode.ACTIVE_SESSIONS_LIMIT_EXCEEDED ->
checkForActiveDownloads()
SplitInstallErrorCode.MODULE_UNAVAILABLE ->
Toast.makeText(
requireActivity(),
"You don't have access to $moduleInvestment module",
Toast.LENGTH_LONG).show()
}
}
我该如何解决这个问题?