这是我当前用于获取远程配置的代码。我现在迷路了,因为它在已安装的版本上工作正常,但在即时应用程序上却无法正常工作。
val firebaseRemoteConfig = FirebaseRemoteConfig.getInstance()
val configSettings = FirebaseRemoteConfigSettings.Builder()
.setDeveloperModeEnabled(BuildConfig.DEBUG)
.build()
firebaseRemoteConfig.setConfigSettings(configSettings)
var expiration = CACHE_EXPIRATION
if (firebaseRemoteConfig.info.configSettings.isDeveloperModeEnabled) {
expiration = 0
}
firebaseRemoteConfig
.fetch(expiration)
.addOnCompleteListener {
if (it.isSuccessful) {
Log.e("TAG", "SUCCESS")
} else {
Log.e("TAG", "FAILED")
}
}
当我尝试运行即时应用程序时,出现错误:
W/FirebaseRemoteConfig: IPC failure: 6500:NOT_AUTHORIZED_TO_FETCH