diff --git a/android/build.gradle b/android/build.gradle index 6f5cb8ddc..ab6f32077 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,9 +8,13 @@ if (isNewArchitectureEnabled()) { } android { - namespace = "com.imagepicker" compileSdkVersion 33 + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace "com.imagepicker" + } + // Used to override the NDK path/version on internal CI or by allowing // users to customize the NDK path/version from their root project (e.g. for M1 support) if (rootProject.hasProperty("ndkPath")) {