Flutter Project Build Warning: Mapping new ns Error Solution

Hello friends, Recently when I was creating a new flutter project and build it then I saw it is showing a Error about Mapping new ns. The error is too big and red. Though the project build and run properly but It bothers me that why it is showing us a error. So I decided to Google it. Once I Google it then I saw this error is regarding to old android Gradle and to solve it we have to update the Gradle in our flutter project to latest one. Thanks to some help from internet I found the proper working solution for this error and solve it. So in this tutorial we would learn about Flutter Project Build Warning: Mapping new ns Error Solution.

Error Screenshot :-

Flutter Project Build Warning: Mapping new ns Error Solution

Error in Text Form :-

D:\Flutter\app2>flutter run
Using hardware rendering with device Android SDK built for x86. If you notice
graphics artifacts, consider enabling software rendering with
Launching lib\main.dart on Android SDK built for x86 in debug mode…
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Running Gradle task ‘assembleDebug’… 134.9s
โˆš Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk… 1,702ms
Syncing files to device Android SDK built for x86… 344ms

Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate “flutter run” but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Running with sound null safety

An Observatory debugger and profiler on Android SDK built for x86 is available at:
The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at:

Content in this project Flutter Project Build Warning: Mapping new ns Error Solution :-

1. To solve the Mapping error, First we have to Open Your_Flutter_App -> android -> build.gradle file and text editor. I’m using Visual Studio Code editor. Now go inside dependencies block in buildscript and Here you have to update your old build Gradle to new com.android.tools.build:gradle:7.0.2.

Source Code of My build.gradle file after updating :-

2. Now we have to also update Gradle distributionUrl in Your_Flutter_Project -> android -> gradle -> wrapper -> gradle-wrapper.properties file. So open this file and put new Gradle URL https\://services.gradle.org/distributions/gradle-7.2-all.zip .

Source Code of My gradle-wrapper.properties file after updating :-

3. Now the main part, We have to clean our flutter project build and rebuilt it again. So open your flutter project Root directory in CMD or Terminal and execute flutter cleanย command.

4. Now you are good to go. All you have to do is run your flutter project with flutter runย command and you will see that the error is gone.

Thanks for reading our tutorial. Hopefully It helped you ๐Ÿ™‚ .


  1. TNX a LOOOOT ๐Ÿ™‚

  2. bro, thank you very much, anyone else can’t explain how fixed

  3. Thank You!

Leave a Reply

Your email address will not be published.