• Courses
  • YouTube
  • Dev News
  • Technology
  • Blogs
  • Flutter Jobs
  • Contact
    • About Us
    • RegisterLogin
    Navoki
    • Courses
    • YouTube
    • Dev News
    • Technology
    • Blogs
    • Flutter Jobs
    • Contact
      • About Us
    • RegisterLogin

      Android

      • Home
      • Blog
      • Android
      • [SOLVED] Warning: Mapping new ns to old ns
      Flutter Warning: Mapping New Ns To Old Ns

      [SOLVED] Warning: Mapping new ns to old ns

      • Posted by Shivam Srivastava
      • Categories Android, Dart, Flutter, Flutter Mobile
      • Date February 23, 2022
      • Comments 2 comments
      Spread the love
      Contents hide
      1 Error: Mapping new ns to old ns
      2 Solution
      2.1 1. Clean your project
      2.2 2. Update gradle.properties
      2.3 3. Update project build.gradle
      2.4 4. Final Step
      2.5 ASK Flutter questions for FREE!
      2.6 Please login to bookmark

      Hey! Flutter Dev if you are here that means your are facing warning about Mapping new ns to old ns , you recently updated to Flutter SDK 2.10, and the project shows the red warning. Though the project will run properly. This solution is related to an old version of Gradle in Android Native projects that need migration to the new Gradle Version. I found the proper solution for this issue.

      Error: Mapping new ns to old ns

      Launching lib\main.dart on ONEPLUS A6010 in debug mode...
      Running Gradle task 'assembleDebug'...
      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/addon2/03 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/repository2/03 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/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/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
      Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

      Solution

      Follow below steps:

      1. Clean your project

      Run flutter clean command and make sure <project>/build folder and <project>/android/build is deleted.

      2. Update gradle.properties

      Got to gradle-wrapper.properties file located at <project>/android/gradle , then set value to distributionUrl to whatever latest gradle distribution is available, https\://services.gradle.org/distributions/gradle-7.4-bin.zip

      #Wed Feb 16 23:35:26 IST 2022
      distributionBase=GRADLE_USER_HOME
      distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
      distributionPath=wrapper/dists
      zipStorePath=wrapper/dists
      zipStoreBase=GRADLE_USER_HOME
      

      3. Update project build.gradle

      Update your android build.gradle file located at <project>/android/build.gradle with new version of Gradle and Kotlin available at this time.

      classpath 'com.android.tools.build:gradle:7.1.1' and ext.kotlin_version = '1.6.10'

      buildscript {
          ext.kotlin_version = '1.6.10'
          repositories {
              google()
              mavenCentral()
          }
      
          dependencies {
              classpath 'com.android.tools.build:gradle:7.1.1'
              classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
              classpath 'com.google.gms:google-services:4.3.10'
          }
      }
      
      allprojects {
          repositories {
              google()
              mavenCentral()
          }
      }
      
      rootProject.buildDir = '../build'
      subprojects {
          project.buildDir = "${rootProject.buildDir}/${project.name}"
          project.evaluationDependsOn(':app')
      }
      
      task clean(type: Delete) {
          delete rootProject.buildDir
      }
      

      4. Final Step

      Run flutter packages get , then run your flutter app first it may take more time as IDE downloads new files.
      Thanks for reading our tutorial. Hopefully It helped you

      ASK Flutter questions for FREE!

      Ask me anywhere your flutter questions from basic to advance topics for free. Instagram , LinkedIn, Discord

      Bookmark(0)

      Please login to bookmark

      Continue with Google
      +2

      Tag:android, dart language, flutter commands, flutter console log, flutter dev, warning mapping new ns to old ns, warning: mapping new ns flutter, warning: mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01

      • Share:
      author avatar
      Shivam Srivastava

      Mobile Solution [email protected], Android and Flutter Dev, Dart ,Founder of @Navoki, Instructor

      Previous post

      Linux Desktop app with Flutter | Publish on Snapcraft Tutorial
      February 23, 2022

      Next post

      How to Install Flutter on Windows, macOS and Ubuntu
      April 11, 2022

      You may also like

      everything-about-flutter-3-in-google-i-o-2022 navoki.com
      Everything about Flutter 3 in Google I/O 2022
      12 May, 2022
      Flutter-Web-CORS-Error-SOLVED-Navoki.com
      [SOLVED] Flutter Web CORS Error
      4 May, 2022
      How Video Call works in Flutter
      How Incoming Video Call Notification works in Flutter
      15 April, 2022

        2 Comments

      1. SuDeep Jaiswal
        March 27, 2022
        Log in to Reply

        Helpful👌

      2. Fadowo Michael
        July 18, 2022
        Log in to Reply

        Hello, you used 7.4 earlier but used 7.1.1.
        i don’t understand

      Leave A Reply Cancel reply

      You must be logged in to post a comment.


      Categories

      • Android
      • Dart
      • Dart Server
      • Dart Web
      • Developers
      • Flutter
      • Flutter Desktop
      • Flutter Mobile
      • Flutter Web
      • Fuchsia
      • Go Lang
      • Technology
      • Uncategorized

      Recent Post

      • Everything-About-Flutter-3-In-Google-I-O-2022 Navoki.comEverything about Flutter 3 in Google I/O 2022
      • Flutter-Web-Cors-Error-Solved-Navoki.com[SOLVED] Flutter Web CORS Error
      • How Video Call Works In FlutterHow Incoming Video Call Notification works in Flutter

      Subscribe Now

       

      Recent Courses

      Single And Multi Selection Listview In Flutter

      Single and Multi Selection ListView in Flutter

      Go Installation And Variables

      Go Installation and Variables

      List In Dart Programming Language

      List in Dart Programming language

      Variables In Dart Programming Language

      Variables in Dart Programming language

      View All

      DON’T MISS
      FLUTTER UPDATES

      Be the first to know when our blog is published.

      flutter-mobile-mockup

      Check your inbox or spam folder to confirm your subscription.

      Contact

      •   Navoki Technologies Pvt. Ltd.
        JMD Megapolis , Sector 48, Gurugram, Haryana 122018

      Company

      • About Us
      • Blogs
      • Contact
      • Privacy policy
      • Terms & Condition

      Useful Links

      • Courses
      • Youtube
      • Dev News

      Mobile

      Click and Get started in seconds

      "Navoki" is a registered trademark of Navoki.com ® 2020–2030 Navoki Technologies Pvt Ltd.

      • Terms & Condition

      Login with your site account

      Continue with Google

      By "Sign in” above to accept Navoki’s Terms of Service & Privacy Policy.

      Not a member yet? Register now

      Register a new account

      Continue with Google

      By "Sign Up” above to accept Navoki’s Terms of Service & Privacy Policy.

      Are you a member? Login now