| Index: packages/flutter_tools/lib/src/commands/build_apk.dart
|
| diff --git a/packages/flutter_tools/lib/src/commands/build_apk.dart b/packages/flutter_tools/lib/src/commands/build_apk.dart
|
| index 114b8622a3f19585d7f69fa205ef918de0c766db..86d8854a7f56ac07eee5ff6ffadf76088bf79398 100644
|
| --- a/packages/flutter_tools/lib/src/commands/build_apk.dart
|
| +++ b/packages/flutter_tools/lib/src/commands/build_apk.dart
|
| @@ -553,9 +553,12 @@ Future<Null> buildAndroid(
|
|
|
| // Build an AOT snapshot if needed.
|
| if (isAotBuildMode(buildMode) && aotPath == null) {
|
| - aotPath = await buildAotSnapshot(findMainDartFile(target), platform, buildMode);
|
| - if (aotPath == null)
|
| + String dartFile = findMainDartFile(target);
|
| + String dillFile = await buildDilFile(dartFile);
|
| + aotPath = await buildAotSnapshot(dillFile != null ? dillFile : dartFile, platform, buildMode);
|
| + if (aotPath == null) {
|
| throwToolExit('Failed to build AOT snapshot');
|
| + }
|
| }
|
|
|
| if (aotPath != null) {
|
|
|