diff --git a/packages/integration_test/android/build.gradle b/packages/integration_test/android/build.gradle index f617e122966..5d493690d19 100644 --- a/packages/integration_test/android/build.gradle +++ b/packages/integration_test/android/build.gradle @@ -26,6 +26,10 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'dev.flutter.integration_test' + } compileSdkVersion 31 compileOptions { diff --git a/packages/integration_test/example/android/app/build.gradle b/packages/integration_test/example/android/app/build.gradle index bc4a84f721a..6f9dc2be9cd 100644 --- a/packages/integration_test/example/android/app/build.gradle +++ b/packages/integration_test/example/android/app/build.gradle @@ -29,6 +29,10 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'com.example.integration_test_example' + } compileSdkVersion flutter.compileSdkVersion compileOptions {