fix an NPE when the flutter.yaml file is missing
This commit is contained in:
@@ -242,9 +242,11 @@ Future<_ApkComponents> _findApkComponents(
|
||||
components.debugKeystore = new File(artifactPaths[3]);
|
||||
components.resources = new Directory(resources);
|
||||
|
||||
await parseServiceConfigs(components.services,
|
||||
jars: components.jars,
|
||||
androidSdk: components.androidSdk.path);
|
||||
await parseServiceConfigs(
|
||||
components.services,
|
||||
jars: components.jars,
|
||||
androidSdk: components.androidSdk.path
|
||||
);
|
||||
|
||||
if (!components.resources.existsSync()) {
|
||||
// TODO(eseidel): This level should be higher when path is manually set.
|
||||
|
||||
@@ -29,7 +29,7 @@ Future parseServiceConfigs(
|
||||
return;
|
||||
|
||||
dynamic manifest = _loadYamlFile(_kFlutterManifestPath);
|
||||
if (manifest['services'] == null)
|
||||
if (manifest == null || manifest['services'] == null)
|
||||
return;
|
||||
|
||||
for (String service in manifest['services']) {
|
||||
|
||||
Reference in New Issue
Block a user