Unverified Commit 590dbbd9 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

[flutter_tool] Log an Android X related failure to analytics (#33782)

parent 6619ab8f
......@@ -20,6 +20,8 @@ import '../cache.dart';
import '../flutter_manifest.dart';
import '../globals.dart';
import '../project.dart';
import '../runner/flutter_command.dart';
import '../usage.dart';
import 'android_sdk.dart';
import 'android_studio.dart';
......@@ -468,6 +470,11 @@ Future<void> _buildGradleProjectV2(
printError('The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.');
printError('See https://goo.gl/CP92wY for more information on the problem and how to fix it.');
printError('*******************************************************************************************');
String commandName = '';
if (FlutterCommand.current != null) {
commandName = '-${FlutterCommand.current.name}';
}
flutterUsage.sendEvent('build$commandName', 'android-x-failure');
}
throwToolExit('Gradle task $assembleTask failed with exit code $exitCode', exitCode: exitCode);
}
......
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