【发布时间】:2018-10-25 07:07:13
【问题描述】:
我有一个 Flutter 应用,我正在使用远程配置来检索一些信息,但是代码在获取数据时会引发异常。
这是我设置远程配置的方法。
Future<RemoteConfig> setupRemoteConfig() async {
final RemoteConfig remoteConfig = await RemoteConfig.instance;
// Enable developer mode to relax fetch throttling
remoteConfig.setConfigSettings(RemoteConfigSettings(debugMode: true));
remoteConfig.setDefaults(<String, dynamic>{
'categories': "food,drink",
});
await remoteConfig.fetch(expiration: const Duration(hours: 5));
await remoteConfig.activateFetched();
return remoteConfig;
}
此代码引发以下异常:
Exception: Unable to fetch remote config
在我的控制台中显示:
W/FirebaseRemoteConfig(10456): IPC failure: 6503:NOT_AVAILABLE
我该如何解决这个问题?
【问题讨论】:
标签: dart flutter firebase-remote-config