[Android] Support Android 34 (#137191)

Adds support for Android 34 in the following ways:

- Bumps integration tests compile SDK versions 33 --> 34
- Bumps template compile SDK version 33 --> 34
- Also changes deprecated `compileSdkVersion` to `compileSdk`

Part of https://github.com/flutter/flutter/issues/134220
diff --git a/dev/a11y_assessments/android/app/build.gradle b/dev/a11y_assessments/android/app/build.gradle
index c60f9f4..0e6fab9 100644
--- a/dev/a11y_assessments/android/app/build.gradle
+++ b/dev/a11y_assessments/android/app/build.gradle
@@ -28,7 +28,7 @@
 
 android {
     namespace "com.example.a11y_assessments"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/dev/benchmarks/complex_layout/android/app/build.gradle b/dev/benchmarks/complex_layout/android/app/build.gradle
index e6845e0..a6daea8 100644
--- a/dev/benchmarks/complex_layout/android/app/build.gradle
+++ b/dev/benchmarks/complex_layout/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "com.yourcompany.complexLayout"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_11
diff --git a/dev/benchmarks/macrobenchmarks/android/app/build.gradle b/dev/benchmarks/macrobenchmarks/android/app/build.gradle
index 6f2a8a6..83f62d1 100644
--- a/dev/benchmarks/macrobenchmarks/android/app/build.gradle
+++ b/dev/benchmarks/macrobenchmarks/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "com.example.macrobenchmarks"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/benchmarks/microbenchmarks/android/app/build.gradle b/dev/benchmarks/microbenchmarks/android/app/build.gradle
index 3e2298c..5e8c3a8 100644
--- a/dev/benchmarks/microbenchmarks/android/app/build.gradle
+++ b/dev/benchmarks/microbenchmarks/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "com.yourcompany.microbenchmarks"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/benchmarks/multiple_flutters/android/app/build.gradle b/dev/benchmarks/multiple_flutters/android/app/build.gradle
index 1df6b8c..6a671e4 100644
--- a/dev/benchmarks/multiple_flutters/android/app/build.gradle
+++ b/dev/benchmarks/multiple_flutters/android/app/build.gradle
@@ -14,7 +14,7 @@
     }
 
     namespace "dev.flutter.multipleflutters"
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/benchmarks/platform_views_layout/android/app/build.gradle b/dev/benchmarks/platform_views_layout/android/app/build.gradle
index 80af41d..c9ac7ce 100644
--- a/dev/benchmarks/platform_views_layout/android/app/build.gradle
+++ b/dev/benchmarks/platform_views_layout/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "dev.benchmarks.platform_views_layout"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle
index 1fd8842..7481cb6 100644
--- a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle
+++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "dev.benchmarks.platform_views_layout_hybrid_composition"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/benchmarks/test_apps/stocks/android/app/build.gradle b/dev/benchmarks/test_apps/stocks/android/app/build.gradle
index 82e97a1..e708d58 100644
--- a/dev/benchmarks/test_apps/stocks/android/app/build.gradle
+++ b/dev/benchmarks/test_apps/stocks/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "io.flutter.examples.stocks"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle b/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle
index 4228205..8ae4451 100644
--- a/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle
+++ b/dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle
@@ -30,7 +30,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle b/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle
index a05c46a..0fd2d97 100644
--- a/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle
+++ b/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle
@@ -5,7 +5,7 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle b/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle
index 2048fec..1493f01 100644
--- a/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle
+++ b/dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle
@@ -30,7 +30,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle b/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle
index c23b1b6..8b1a63e 100644
--- a/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle
+++ b/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle
@@ -5,7 +5,7 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/android_semantics_testing/android/app/build.gradle b/dev/integration_tests/android_semantics_testing/android/app/build.gradle
index 2190a0f..f9a615f 100644
--- a/dev/integration_tests/android_semantics_testing/android/app/build.gradle
+++ b/dev/integration_tests/android_semantics_testing/android/app/build.gradle
@@ -19,7 +19,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/android_views/android/app/build.gradle b/dev/integration_tests/android_views/android/app/build.gradle
index 50d3cbb..f0bafdc 100644
--- a/dev/integration_tests/android_views/android/app/build.gradle
+++ b/dev/integration_tests/android_views/android/app/build.gradle
@@ -29,7 +29,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/channels/android/app/build.gradle b/dev/integration_tests/channels/android/app/build.gradle
index 4a8e938..293c9d3 100644
--- a/dev/integration_tests/channels/android/app/build.gradle
+++ b/dev/integration_tests/channels/android/app/build.gradle
@@ -31,7 +31,7 @@
 
 android {
     namespace "com.example.channels"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/dev/integration_tests/deferred_components_test/android/app/build.gradle b/dev/integration_tests/deferred_components_test/android/app/build.gradle
index f55a9b7..1eaaaa8 100644
--- a/dev/integration_tests/deferred_components_test/android/app/build.gradle
+++ b/dev/integration_tests/deferred_components_test/android/app/build.gradle
@@ -37,7 +37,7 @@
 
 android {
     namespace "io.flutter.integration.deferred_components_test"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     sourceSets {
         main.java.srcDirs += 'src/main/kotlin'
diff --git a/dev/integration_tests/deferred_components_test/android/component1/build.gradle b/dev/integration_tests/deferred_components_test/android/component1/build.gradle
index 3cf18c5..7738c71 100644
--- a/dev/integration_tests/deferred_components_test/android/component1/build.gradle
+++ b/dev/integration_tests/deferred_components_test/android/component1/build.gradle
@@ -24,7 +24,7 @@
 
 android {
     namespace "io.flutter.integration.deferred_components_test.component1"
-    compileSdkVersion 33
+    compileSdk 34
 
     sourceSets {
         applicationVariants.all { variant ->
diff --git a/dev/integration_tests/external_ui/android/app/build.gradle b/dev/integration_tests/external_ui/android/app/build.gradle
index e605ee3..b459814 100644
--- a/dev/integration_tests/external_ui/android/app/build.gradle
+++ b/dev/integration_tests/external_ui/android/app/build.gradle
@@ -19,7 +19,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/flavors/android/app/build.gradle b/dev/integration_tests/flavors/android/app/build.gradle
index 13470cc..698c7bb 100644
--- a/dev/integration_tests/flavors/android/app/build.gradle
+++ b/dev/integration_tests/flavors/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "com.yourcompany.flavors"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/flutter_gallery/android/app/build.gradle b/dev/integration_tests/flutter_gallery/android/app/build.gradle
index ca9d391..31104e9 100644
--- a/dev/integration_tests/flutter_gallery/android/app/build.gradle
+++ b/dev/integration_tests/flutter_gallery/android/app/build.gradle
@@ -41,7 +41,7 @@
 
 android {
     namespace "io.flutter.demo.gallery"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle b/dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle
index 52d4cb5..d751a90 100644
--- a/dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle
+++ b/dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle
@@ -19,7 +19,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/hybrid_android_views/android/app/build.gradle b/dev/integration_tests/hybrid_android_views/android/app/build.gradle
index 50d3cbb..f0bafdc 100644
--- a/dev/integration_tests/hybrid_android_views/android/app/build.gradle
+++ b/dev/integration_tests/hybrid_android_views/android/app/build.gradle
@@ -29,7 +29,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle b/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle
index 2ca993f..7a2741f 100644
--- a/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle
+++ b/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle
@@ -5,7 +5,7 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/non_nullable/android/app/build.gradle b/dev/integration_tests/non_nullable/android/app/build.gradle
index f766fa9..8fb4ed4 100644
--- a/dev/integration_tests/non_nullable/android/app/build.gradle
+++ b/dev/integration_tests/non_nullable/android/app/build.gradle
@@ -30,7 +30,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/platform_interaction/android/app/build.gradle b/dev/integration_tests/platform_interaction/android/app/build.gradle
index 2190a0f..f9a615f 100644
--- a/dev/integration_tests/platform_interaction/android/app/build.gradle
+++ b/dev/integration_tests/platform_interaction/android/app/build.gradle
@@ -19,7 +19,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/release_smoke_test/android/app/build.gradle b/dev/integration_tests/release_smoke_test/android/app/build.gradle
index 29394b4..6a32771 100644
--- a/dev/integration_tests/release_smoke_test/android/app/build.gradle
+++ b/dev/integration_tests/release_smoke_test/android/app/build.gradle
@@ -29,7 +29,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/integration_tests/spell_check/android/app/build.gradle b/dev/integration_tests/spell_check/android/app/build.gradle
index 4f9057e..edba44d 100644
--- a/dev/integration_tests/spell_check/android/app/build.gradle
+++ b/dev/integration_tests/spell_check/android/app/build.gradle
@@ -31,7 +31,7 @@
 
 android {
     namespace "com.example.spell_check"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/dev/integration_tests/ui/android/app/build.gradle b/dev/integration_tests/ui/android/app/build.gradle
index 0ba4245..29cc531 100644
--- a/dev/integration_tests/ui/android/app/build.gradle
+++ b/dev/integration_tests/ui/android/app/build.gradle
@@ -20,7 +20,7 @@
 
 android {
     namespace "com.yourcompany.integration_ui"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/manual_tests/android/app/build.gradle b/dev/manual_tests/android/app/build.gradle
index f3664fe..ad72953 100644
--- a/dev/manual_tests/android/app/build.gradle
+++ b/dev/manual_tests/android/app/build.gradle
@@ -30,7 +30,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/dev/tracing_tests/android/app/build.gradle b/dev/tracing_tests/android/app/build.gradle
index ad53719..5bee59f 100644
--- a/dev/tracing_tests/android/app/build.gradle
+++ b/dev/tracing_tests/android/app/build.gradle
@@ -30,7 +30,7 @@
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/api/android/app/build.gradle b/examples/api/android/app/build.gradle
index 7221c1a..aaad659 100644
--- a/examples/api/android/app/build.gradle
+++ b/examples/api/android/app/build.gradle
@@ -31,7 +31,7 @@
 
 android {
     namespace "dev.flutter.flutter_api_samples"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/flutter_view/android/app/build.gradle b/examples/flutter_view/android/app/build.gradle
index 8e637f7..ecbe93d 100644
--- a/examples/flutter_view/android/app/build.gradle
+++ b/examples/flutter_view/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "com.example.view"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/hello_world/android/app/build.gradle b/examples/hello_world/android/app/build.gradle
index c5e4488..67db8d3 100644
--- a/examples/hello_world/android/app/build.gradle
+++ b/examples/hello_world/android/app/build.gradle
@@ -27,7 +27,7 @@
 
 android {
     namespace "io.flutter.examples.hello_world"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/image_list/android/app/build.gradle b/examples/image_list/android/app/build.gradle
index 48d6197..2670aaf 100644
--- a/examples/image_list/android/app/build.gradle
+++ b/examples/image_list/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "com.example.image_list"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/layers/android/app/build.gradle b/examples/layers/android/app/build.gradle
index f49cf04..322731c 100644
--- a/examples/layers/android/app/build.gradle
+++ b/examples/layers/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "io.flutter.examples.Layers"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/platform_channel/android/app/build.gradle b/examples/platform_channel/android/app/build.gradle
index 0719714..3c28e7c 100644
--- a/examples/platform_channel/android/app/build.gradle
+++ b/examples/platform_channel/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "com.example.platformchannel"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/examples/platform_view/android/app/build.gradle b/examples/platform_view/android/app/build.gradle
index 0cbbcd0..228e73e 100644
--- a/examples/platform_view/android/app/build.gradle
+++ b/examples/platform_view/android/app/build.gradle
@@ -30,7 +30,7 @@
 
 android {
     namespace "io.flutter.examples.platform_view"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy b/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
index ff5b509..0e09980 100644
--- a/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
+++ b/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
@@ -41,7 +41,7 @@
 */
 class FlutterExtension {
     /** Sets the compileSdkVersion used by default in Flutter app projects. */
-    static int compileSdkVersion = 33
+    static int compileSdkVersion = 34
 
     /** Sets the minSdkVersion used by default in Flutter app projects. */
     static int minSdkVersion = 19
diff --git a/packages/flutter_tools/lib/src/android/gradle_errors.dart b/packages/flutter_tools/lib/src/android/gradle_errors.dart
index cedf220..38d8b76 100644
--- a/packages/flutter_tools/lib/src/android/gradle_errors.dart
+++ b/packages/flutter_tools/lib/src/android/gradle_errors.dart
@@ -613,10 +613,10 @@
         .childDirectory('app')
         .childFile('build.gradle');
     globals.printBox(
-      '${globals.logger.terminal.warningMark} Your project requires a higher compileSdkVersion.\n'
-      'Fix this issue by bumping the compileSdkVersion in ${gradleFile.path}:\n'
+      '${globals.logger.terminal.warningMark} Your project requires a higher compileSdk version.\n'
+      'Fix this issue by bumping the compileSdk version in ${gradleFile.path}:\n'
       'android {\n'
-      '  compileSdkVersion ${minCompileSdkVersionMatch?.group(1)}\n'
+      '  compileSdk ${minCompileSdkVersionMatch?.group(1)}\n'
       '}',
       title: _boxTitle,
     );
diff --git a/packages/flutter_tools/lib/src/android/gradle_utils.dart b/packages/flutter_tools/lib/src/android/gradle_utils.dart
index a0f1dd8..398098e 100644
--- a/packages/flutter_tools/lib/src/android/gradle_utils.dart
+++ b/packages/flutter_tools/lib/src/android/gradle_utils.dart
@@ -39,7 +39,7 @@
 // so new versions are picked up after a Flutter upgrade.
 //
 // Please see the README before changing any of these values.
-const String compileSdkVersion = '33';
+const String compileSdkVersion = '34';
 const String minSdkVersion = '19';
 const String targetSdkVersion = '33';
 const String ndkVersion = '23.1.7779620';
diff --git a/packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl
index 35fc9d1..56ca46a 100644
--- a/packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl
@@ -24,7 +24,7 @@
 
 android {
     namespace "{{androidIdentifier}}"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
index ffd0ba7..fbe88f3 100644
--- a/packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
@@ -24,7 +24,7 @@
 
 android {
     namespace "{{androidIdentifier}}"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/packages/flutter_tools/templates/module/android/deferred_component/build.gradle.tmpl b/packages/flutter_tools/templates/module/android/deferred_component/build.gradle.tmpl
index 8a728d6..013aa0d 100644
--- a/packages/flutter_tools/templates/module/android/deferred_component/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/module/android/deferred_component/build.gradle.tmpl
@@ -19,7 +19,7 @@
 apply plugin: "com.android.dynamic-feature"
 
 android {
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/flutter_tools/templates/module/android/gradle/build.gradle.tmpl b/packages/flutter_tools/templates/module/android/gradle/build.gradle.tmpl
index 66fb017..5f50dc7 100644
--- a/packages/flutter_tools/templates/module/android/gradle/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/module/android/gradle/build.gradle.tmpl
@@ -29,7 +29,7 @@
         namespace '{{androidIdentifier}}'
     }
 
-    compileSdkVersion {{compileSdkVersion}}
+    compileSdk {{compileSdkVersion}}
     defaultConfig {
         minSdkVersion {{minSdkVersion}}
     }
diff --git a/packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl
index 3109a91..6953475 100644
--- a/packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl
@@ -8,7 +8,7 @@
         namespace "{{androidIdentifier}}.host"
     }
 
-    compileSdkVersion {{compileSdkVersion}}
+    compileSdk {{compileSdkVersion}}
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl
index 9ed8965..bfa5380 100644
--- a/packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl
@@ -35,7 +35,7 @@
         namespace '{{androidIdentifier}}'
     }
 
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
index b335974..cb06e05 100644
--- a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
@@ -26,7 +26,7 @@
         namespace '{{androidIdentifier}}'
     }
 
-    compileSdkVersion {{compileSdkVersion}}
+    compileSdk {{compileSdkVersion}}
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
index fbde25d..32d104a 100644
--- a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
@@ -29,7 +29,7 @@
         namespace '{{androidIdentifier}}'
     }
 
-    compileSdkVersion {{compileSdkVersion}}
+    compileSdk {{compileSdkVersion}}
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/flutter_tools/templates/plugin_ffi/android.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin_ffi/android.tmpl/build.gradle.tmpl
index 319ed1f..1092370 100644
--- a/packages/flutter_tools/templates/plugin_ffi/android.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/plugin_ffi/android.tmpl/build.gradle.tmpl
@@ -29,9 +29,9 @@
         namespace '{{androidIdentifier}}'
     }
 
-    // Bumping the plugin compileSdkVersion requires all clients of this plugin
+    // Bumping the plugin compileSdk version requires all clients of this plugin
     // to bump the version in their app.
-    compileSdkVersion {{compileSdkVersion}}
+    compileSdk {{compileSdkVersion}}
 
     // Use the NDK version
     // declared in /android/app/build.gradle file of the Flutter project.
diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart
index 0dee658..37ad977 100644
--- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart
+++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart
@@ -2865,7 +2865,7 @@
 
     final String buildContent = await globals.fs.file('${projectDir.path}/android/app/build.gradle').readAsString();
 
-    expect(buildContent.contains('compileSdkVersion flutter.compileSdkVersion'), true);
+    expect(buildContent.contains('compileSdk flutter.compileSdkVersion'), true);
     expect(buildContent.contains('ndkVersion flutter.ndkVersion'), true);
     expect(buildContent.contains('targetSdkVersion flutter.targetSdkVersion'), true);
   });
diff --git a/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart b/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart
index 5096ae0..2d28c6b 100644
--- a/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart
+++ b/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart
@@ -70,7 +70,7 @@
 
 android {
     namespace "com.example.asset_sample"
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
     ndkVersion flutter.ndkVersion
 
     compileOptions {
diff --git a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart
index 4bd3d1a..ad9bd04 100644
--- a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart
+++ b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart
@@ -1081,13 +1081,13 @@
         testLogger.statusText,
         contains(
           '\n'
-          '┌─ Flutter Fix ─────────────────────────────────────────────────────────────────┐\n'
-          '│ [!] Your project requires a higher compileSdkVersion.                         │\n'
-          '│ Fix this issue by bumping the compileSdkVersion in /android/app/build.gradle: │\n'
-          '│ android {                                                                     │\n'
-          '│   compileSdkVersion 31                                                        │\n'
-          '│ }                                                                             │\n'
-          '└───────────────────────────────────────────────────────────────────────────────┘\n'
+          '┌─ Flutter Fix ──────────────────────────────────────────────────────────────────┐\n'
+          '│ [!] Your project requires a higher compileSdk version.                         │\n'
+          '│ Fix this issue by bumping the compileSdk version in /android/app/build.gradle: │\n'
+          '│ android {                                                                      │\n'
+          '│   compileSdk 31                                                                │\n'
+          '│ }                                                                              │\n'
+          '└────────────────────────────────────────────────────────────────────────────────┘\n'
         )
       );
     }, overrides: <Type, Generator>{
diff --git a/packages/flutter_tools/test/general.shard/project_test.dart b/packages/flutter_tools/test/general.shard/project_test.dart
index 8de8469..ebbbd77 100644
--- a/packages/flutter_tools/test/general.shard/project_test.dart
+++ b/packages/flutter_tools/test/general.shard/project_test.dart
@@ -1662,7 +1662,7 @@
   return '''
 apply plugin: 'com.android.application'
 android {
-    compileSdkVersion 33
+    compileSdk 34
 
     defaultConfig {
         applicationId '$id'
@@ -1679,7 +1679,7 @@
 apply plugin: 'com.android.library'
 
 android {
-    compileSdkVersion 33
+    compileSdk 34
 }
 ''';
 }
diff --git a/packages/flutter_tools/test/integration.shard/android_plugin_compilesdkversion_mismatch_test.dart b/packages/flutter_tools/test/integration.shard/android_plugin_compilesdkversion_mismatch_test.dart
index bf090b6..1ac4d5a 100644
--- a/packages/flutter_tools/test/integration.shard/android_plugin_compilesdkversion_mismatch_test.dart
+++ b/packages/flutter_tools/test/integration.shard/android_plugin_compilesdkversion_mismatch_test.dart
@@ -23,7 +23,7 @@
     tryToDelete(tempDir);
   });
 
-  test('error logged when plugin Android compileSdkVersion higher than project', () async {
+  test('error logged when plugin Android compileSdk version higher than project', () async {
     final String flutterBin = fileSystem.path.join(
       getFlutterRoot(),
       'bin',
@@ -46,10 +46,10 @@
 
     final String pluginBuildGradle = pluginGradleFile.readAsStringSync();
 
-    // Bump up plugin compileSdkVersion to 31
-    final RegExp androidCompileSdkVersionRegExp = RegExp(r'compileSdkVersion ([0-9]+|flutter.compileSdkVersion)');
+    // Bump up plugin compileSdk version to 31
+    final RegExp androidCompileSdkVersionRegExp = RegExp(r'compileSdk ([0-9]+|flutter.compileSdkVersion)');
     final String newPluginGradleFile = pluginBuildGradle.replaceAll(
-      androidCompileSdkVersionRegExp, 'compileSdkVersion 31');
+      androidCompileSdkVersionRegExp, 'compileSdk 31');
     pluginGradleFile.writeAsStringSync(newPluginGradleFile);
 
     final Directory pluginExampleAppDir = pluginAppDir.childDirectory('example');
@@ -59,9 +59,9 @@
 
     final String projectBuildGradle = projectGradleFile.readAsStringSync();
 
-    // Bump down plugin example app compileSdkVersion to 30
+    // Bump down plugin example app compileSdk version to 30
     final String newProjectGradleFile = projectBuildGradle.replaceAll(
-      androidCompileSdkVersionRegExp, 'compileSdkVersion 30');
+      androidCompileSdkVersionRegExp, 'compileSdk 30');
     projectGradleFile.writeAsStringSync(newProjectGradleFile);
 
     // Run flutter build apk to build plugin example project
diff --git a/packages/flutter_tools/test/integration.shard/flutter_build_preview_sdk.dart b/packages/flutter_tools/test/integration.shard/flutter_build_preview_sdk.dart
index 0cbe2ee..a933f2b 100644
--- a/packages/flutter_tools/test/integration.shard/flutter_build_preview_sdk.dart
+++ b/packages/flutter_tools/test/integration.shard/flutter_build_preview_sdk.dart
@@ -40,12 +40,12 @@
     'build succeeds targeting string compileSdkVersion',
     () async {
       final File buildGradleFile = exampleAppDir.childDirectory('android').childDirectory('app').childFile('build.gradle');
-      // write a build.gradle with compileSdkVersion as `android-Tiramisu` which is a string preview version
+      // write a build.gradle with compileSdk version as `android-Tiramisu` which is a string preview version
       buildGradleFile.writeAsStringSync(
-        buildGradleFile.readAsStringSync().replaceFirst('compileSdkVersion flutter.compileSdkVersion', 'compileSdkVersion "android-Tiramisu"'),
+        buildGradleFile.readAsStringSync().replaceFirst('compileSdk flutter.compileSdkVersion', 'compileSdk "android-Tiramisu"'),
         flush: true
       );
-      expect(buildGradleFile.readAsStringSync(), contains('compileSdkVersion "android-Tiramisu"'));
+      expect(buildGradleFile.readAsStringSync(), contains('compileSdk "android-Tiramisu"'));
 
       final ProcessResult result = await processManager.run(<String>[
         flutterBin,
@@ -70,7 +70,7 @@
       final File buildGradleFile = exampleAppDir.childDirectory('android').childDirectory('app').childFile('build.gradle');
       // write a build.gradle with compileSdkPreview as `Tiramisu` which is a string preview version
       buildGradleFile.writeAsStringSync(
-        buildGradleFile.readAsStringSync().replaceFirst('compileSdkVersion flutter.compileSdkVersion', 'compileSdkPreview "Tiramisu"'),
+        buildGradleFile.readAsStringSync().replaceFirst('compileSdk flutter.compileSdkVersion', 'compileSdkPreview "Tiramisu"'),
         flush: true
       );
       expect(buildGradleFile.readAsStringSync(), contains('compileSdkPreview "Tiramisu"'));
diff --git a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart
index f3377e0..3f02190 100644
--- a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart
+++ b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart
@@ -77,7 +77,7 @@
     apply plugin: "com.android.dynamic-feature"
 
     android {
-        compileSdkVersion 33
+        compileSdk 34
 
         sourceSets {
             applicationVariants.all { variant ->
diff --git a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart
index 4a0ec4b..b925e18 100644
--- a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart
+++ b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart
@@ -175,7 +175,7 @@
   apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
   android {
-      compileSdkVersion flutter.compileSdkVersion
+      compileSdk flutter.compileSdkVersion
       ndkVersion flutter.ndkVersion
 
       sourceSets {
diff --git a/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart b/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart
index 80ffcec..edd9ac8 100644
--- a/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart
+++ b/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart
@@ -144,7 +144,7 @@
   apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
   android {
-      compileSdkVersion 33
+      compileSdk 34
 
       compileOptions {
           sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/integration_test/android/build.gradle b/packages/integration_test/android/build.gradle
index 2f8e2f9..3cada21 100644
--- a/packages/integration_test/android/build.gradle
+++ b/packages/integration_test/android/build.gradle
@@ -31,7 +31,7 @@
         namespace 'dev.flutter.integration_test'
     }
 
-    compileSdkVersion 33
+    compileSdk 34
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/integration_test/example/android/app/build.gradle b/packages/integration_test/example/android/app/build.gradle
index 738d906..bf10634 100644
--- a/packages/integration_test/example/android/app/build.gradle
+++ b/packages/integration_test/example/android/app/build.gradle
@@ -33,7 +33,7 @@
     if (project.android.hasProperty("namespace")) {
         namespace 'com.example.integration_test_example'
     }
-    compileSdkVersion flutter.compileSdkVersion
+    compileSdk flutter.compileSdkVersion
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8