Revert "Revert "Use AndroidX in new projects by default (#40925)" (#40995)" (#41001)
This reverts commit 8e231796272f7f14391ca9c6b40392bc20f96aeb.
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart
index 2e5ad13..4c35620 100644
--- a/packages/flutter_tools/lib/src/commands/create.dart
+++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -141,7 +141,7 @@
argParser.addFlag(
'androidx',
negatable: true,
- defaultsTo: false,
+ defaultsTo: true,
help: 'Generate a project using the AndroidX support libraries',
);
// Deprecated
@@ -398,7 +398,7 @@
final String relativeDirPath = fs.path.relative(projectDirPath);
if (!projectDir.existsSync() || projectDir.listSync().isEmpty) {
- printStatus('Creating project $relativeDirPath...');
+ printStatus('Creating project $relativeDirPath... androidx: ${argResults['androidx']}');
} else {
if (sampleCode != null && !argResults['overwrite']) {
throwToolExit('Will not overwrite existing project in $relativeDirPath: '