Unverified Commit 7e60a65f authored by Emmanuel Garcia's avatar Emmanuel Garcia Committed by GitHub

Don't read AndroidManifest.xml if it doesn't exit (#43669)

parent 53dcf92f
......@@ -361,8 +361,11 @@ List<Map<String, dynamic>> _extractPlatformMaps(List<Plugin> plugins, String typ
/// [project] is using.
String _getAndroidEmbeddingVersion(FlutterProject project) {
assert(project.android != null);
final File androidManifest = project.android.appManifestFile;
assert(androidManifest.existsSync());
if (androidManifest == null || !androidManifest.existsSync()) {
return '1';
}
xml.XmlDocument document;
try {
document = xml.parse(androidManifest.readAsStringSync());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment