'Build Warning : Mapping new ns to old ns

So, I'm using Flutter and on running the App, I receive errors like these in the debug console:

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01

I did flutter clean, but no effect.

I tried the answer here: How to change build tools version in Android Studio

But, when I look for build.gradle file, I have two files one in /android and another in /android/app. But both of these do not have any configuration to change buildToolsVersion.

I did sdkmanager --list_installed and I hae two build-tools versions:

  build-tools;29.0.2   | 29.0.2  | Android SDK Build-Tools 29.0.2 | build-tools/29.0.2  
  build-tools;30.0.2   | 30.0.2  | Android SDK Build-Tools 30.0.2 | build-tools/30.0.2  

What should I do to fix this Warning ?

Also, I am not using Android Studio. I used this guide to install Flutter without Android Studio: How to Install and Configure Flutter Without Android Studio



Solution 1:[1]

as per the top-voted answer, the bug not fixed for me.....

so using this way fixed my bug

  1. first updated the "android sdk build-tools" to 32

path :android studio>sdk manager>system setting>android sdk>sdk tool> update "android sdk build-tools"

then

android/build.gradle added this line

 dependencies {
        classpath 'com.android.tools.build:gradle:7.0.1'

then

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

after

"flutter clean" on terminal

restart

i am using flutter 2.8.1 , after that we can see in android/.gradle new file will appear that is 7.0.2 folder

so using this way fixed my bug

Solution 2:[2]

It not happen becuase of you have two build-tools version installed. It happens because of caches so on android studio just invalidating caches and restarting will fix this.

Solution 3:[3]

Please change two files:

  1. android/build.gradle and set as the following under dependencies:

classpath 'com.android.tools.build:gradle:7.2.1'

  1. android/gradle/wrapper/gradle-wrapper.properties and set the following: Here the Gradle version should be compatible with the mentioned in the build.gradle file.

distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jinto Joseph
Solution 2 Suganya
Solution 3 Md. Majharul Haque