mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
[flutter_tool] Log an Android X related failure to analytics (#33782)
This commit is contained in:
parent
6619ab8fea
commit
590dbbd924
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue