diff --git a/android/build.gradle b/android/build.gradle index fa3524e..434b364 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -59,7 +59,10 @@ afterEvaluate { } android { - namespace = "com.reactnativeimagecolors" + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace = "com.reactnativeimagecolors" + } compileSdkVersion safeExtGet("compileSdkVersion", 31) compileOptions {