Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] Warning: Mapping new ns lines are printed in the logs during gradlew #87464

Open
Mirshodbek opened this issue Aug 2, 2021 · 20 comments
Labels
found in release: 2.2 Found to occur in 2.2 found in release: 2.5 Found to occur in 2.5 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically t: gradle "flutter build" and "flutter run" on Android team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team

Comments

@Mirshodbek
Copy link

Mirshodbek commented Aug 2, 2021

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  

Hello. When is running project I get this warning . What is happened here? And how to resolve this issue? thank

@Mirshodbek Mirshodbek added the from: performance template Issues created via a performance issue template label Aug 2, 2021
@TahaTesser TahaTesser added in triage Presently being triaged by the triage team and removed from: performance template Issues created via a performance issue template labels Aug 2, 2021
@TahaTesser
Copy link
Member

Hi @Mirshodbek
This is not related to Flutter itself. see this
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

@TahaTesser TahaTesser added r: invalid Issue is closed as not valid and removed in triage Presently being triaged by the triage team labels Aug 2, 2021
@Mirshodbek
Copy link
Author

Mirshodbek commented Aug 3, 2021 via email

@devchenli

This comment has been minimized.

@TahaTesser TahaTesser reopened this Aug 5, 2021
@TahaTesser TahaTesser added in triage Presently being triaged by the triage team and removed r: invalid Issue is closed as not valid labels Aug 5, 2021
@TahaTesser
Copy link
Member

Hi @Mirshodbek @devchenli
I can reproduce the issue, it occurs during gradlew command so I am not sure if it is related to Flutter itself.

[   +1 ms] executing: [/home/taha/StudioProjects/master_flutter/android/] /home/taha/StudioProjects/master_flutter/android/gradlew -Pverbose=true
-Ptarget-platform=android-arm -Ptarget=/home/taha/StudioProjects/master_flutter/lib/main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==
-Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+3251 ms] 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

A solution suggested was to use build tools 30.0.3 but still persist, labelling for gradle

stable master

Check flutter doctor -v outputs for each channel below

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
    • Flutter version 2.2.3 at /home/taha/Code/flutter_stable
    • Framework revision f4abaa0735 (5 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/taha/Code/android-sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_SDK_ROOT = /home/taha/Code/android-sdk
    • Java binary at: /home/taha/Code/android-studio-preview/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/taha/Code/android-studio
    • Flutter plugin version 58.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/taha/Code/android-studio-preview
    • Flutter plugin version 58.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.58.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.25.0

[✓] Connected device (3 available)
    • SM M025F (mobile) • R9ZR205XX0A • android-arm    • Android 11 (API 30)
    • Linux (desktop)   • linux       • linux-x64      • Linux
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 92.0.4515.107

• No issues found!
[✓] Flutter (Channel master, 2.5.0-2.0.pre.181, on Pop!_OS 21.04 5.11.0-7620-generic, locale en_US.UTF-8)
    • Flutter version 2.5.0-2.0.pre.181 at /home/taha/Code/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e40d7e6ef4 (8 hours ago), 2021-08-05 14:15:04 +0800
    • Engine revision c3739afe0a
    • Dart version 2.14.0 (build 2.14.0-377.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/taha/Code/android-sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_SDK_ROOT = /home/taha/Code/android-sdk
    • Java binary at: /home/taha/Code/android-studio-preview/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/taha/Code/android-studio
    • Flutter plugin version 58.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/taha/Code/android-studio-preview
    • Flutter plugin version 58.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.58.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.25.0

[✓] Connected device (3 available)
    • SM M025F (mobile) • R9ZR205XX0A • android-arm    • Android 11 (API 30)
    • Linux (desktop)   • linux       • linux-x64      • Pop!_OS 21.04 5.11.0-7620-generic
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 92.0.4515.107

• No issues found!

✅: No Issue ❌: Issue reproduced

@TahaTesser TahaTesser removed the in triage Presently being triaged by the triage team label Aug 5, 2021
@TahaTesser TahaTesser changed the title Warning: Mapping new [tools] Warning: Mapping new ns are printed in the logs during gradlew Aug 5, 2021
@TahaTesser TahaTesser changed the title [tools] Warning: Mapping new ns are printed in the logs during gradlew [tools] Warning: Mapping new ns lines are printed in the logs during gradlew Aug 5, 2021
@TahaTesser TahaTesser added found in release: 2.2 Found to occur in 2.2 found in release: 2.5 Found to occur in 2.5 has reproducible steps The issue has been confirmed reproducible and is ready to work on t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels. labels Aug 5, 2021
@qrhfz

This comment has been minimized.

@zanderso zanderso added the platform-android Android applications specifically label Aug 10, 2021
@zanderso
Copy link
Member

What are the steps to reproduce this issue?

/cc @blasten

@zanderso zanderso added the P2 Important issues not at the top of the work list label Aug 10, 2021
@vHanda
Copy link

vHanda commented Sep 13, 2021

What are the steps to reproduce this issue?

I can reproduce this in the GitJournal project.

@Hixie
Copy link
Contributor

Hixie commented Nov 11, 2021

It may not be caused by Flutter itself, but we should still figure out what's causing it and stop it, since it's clearly not useful to our users.

@talamaska
Copy link
Contributor

It is some discrepancies in the gradle versions. I have tested with the codelab https://github.com/googlecodelabs/admob-inline-ads-in-flutter.
There was some toaster from AS that the project gradle version could be updated.
I have set distributionUrl=https://services.gradle.org/distributions/gradle-7.0.2-bin.zip in gradle-wrapper.properties and
classpath 'com.android.tools.build:gradle:7.0.3' in android/build.gradle and the warnings disappeared.

@talamaska
Copy link
Contributor

talamaska commented Nov 28, 2021

Interestingly enough, I have a package, that on one machine is not throwing any warnings. On another, after an AS and SDK reinstall started throwing these warning. I have the same sdks, build tools, ndks and emulators. I cleaned build cache and cache in the ~/.android folder and the wrappers, cache and daemon folders from ~/.gradle folder, same thing. I have android sdk from 26 to 30 and the build-tools installed are 26.0.2, 28.0.3, 29.0.2, 30.0.2 and 31.0.0. The ndk's are 21.1.6352462 and 23.0.7599858. The project is setup with
distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip
and classpath 'com.android.tools.build:gradle:4.1.0'

I'm building for emulator 29 and compileSdkVersion and targetSdkVersion is 29
Also because I know that the .idea folder is in .gitignore, I even copied manually the whole project from one machine to another with a usb drive without any success.
I'm trying to provide as much information I have in order to help finding what's the issue.
Sure it's just a warning, but it's pretty annoying because I don't know how to resolve it. Is it safe to update gradle versions all to 7.x like in my previous comment? I'm not sure about this because I saw some messages from gradle that in the scripts were used some deprecated stuff. I'm not an Android developer. Please help.

@lfernando43
Copy link

gradle:7.0.3

It worked for me too!
Thanks for the advice...

@lfernando43
Copy link

set distributionUrl=https://services.gradle.org/distributions/gradle-7.0.2-bin.zip in gradle-wrapper.properties and
classpath 'com.android.tools.build:gradle:7.0.3' in android/build.gradle

@cpin-fortinet
Copy link

This solves the issue for me:
https://stackoverflow.com/a/70570495/17825313

Basically just use the latest gradle plugin and gradle version of the AndroidStudio and make sure they both match according to the official doc.

@insinfo
Copy link

insinfo commented Jan 4, 2022

I created a new project with 'flutter create' and saw this message on the console, I think the flutter team could update the project template to the new version of gradle

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
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:54476/JlV5NLjTUeo=/ws

@talamaska
Copy link
Contributor

@insinfo with which version of flutter you are trying this? I don't think I'm seeing this in latest stable.

@insinfo
Copy link

insinfo commented Jan 4, 2022

I created a new project with 'flutter create' and started seeing these messages
last stable version 2.8.1

PS C:\MyDartProjects\riodasostras\riodasostrasapp_mob> flutter doctor -v
[✓] Flutter (Channel stable, 2.8.1, on Microsoft Windows [versão 10.0.22000.376], locale pt-BR)
    • Flutter version 2.8.1 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (3 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\Users\isaque\AppData\Local\Android\sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.3)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.31702.278
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.63.2)
    • VS Code at C:\Users\isaque\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.32.0

[✓] Connected device (4 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [versão 10.0.22000.376]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 96.0.4664.110
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 96.0.1054.62

• No issues found!
PS C:\MyDartProjects\riodasostras\riodasostrasapp_mob> 

@Delekings
Copy link

To solve this issue, you have to make sure your gradle in your build.gradle and the gradle in your android/gradle/wrapper/gradle-wrapper.properties are the same version. even if they are not the latest version, it must be the tally with each other like this:

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

emphasis on the gradle-7.3

and

android/build.gradle

buildscript {
repositories {
...
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
...
}
}

@warcayac
Copy link

This post worked for me.

@lcyper
Copy link

lcyper commented Feb 16, 2022

To solve this issue, you have to make sure your gradle in your build.gradle and the gradle in your android/gradle/wrapper/gradle-wrapper.properties are the same version. even if they are not the latest version, it must be the tally with each other like this:

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

emphasis on the gradle-7.3

and

android/build.gradle

buildscript { repositories { ... }

dependencies { classpath 'com.android.tools.build:gradle:7.0.0' ... } }

find last gradle version
https://gradle.org/releases/

find last dependenci version
https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google

@SAKHANA99
Copy link

Interestingly enough, I have a package, that on one machine is not throwing any warnings. On another, after an AS and SDK reinstall started throwing these warning. I have the same sdks, build tools, ndks and emulators. I cleaned build cache and cache in the ~/.android folder and the wrappers, cache and daemon folders from ~/.gradle folder, same thing. I have android sdk from 26 to 30 and the build-tools installed are 26.0.2, 28.0.3, 29.0.2, 30.0.2 and 31.0.0. The ndk's are 21.1.6352462 and 23.0.7599858. The project is setup with distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip and classpath 'com.android.tools.build:gradle:4.1.0'

I'm building for emulator 29 and compileSdkVersion and targetSdkVersion is 29 Also because I know that the .idea folder is in .gitignore, I even copied manually the whole project from one machine to another with a usb drive without any success. I'm trying to provide as much information I have in order to help finding what's the issue. Sure it's just a warning, but it's pretty annoying because I don't know how to resolve it. Is it safe to update gradle versions all to 7.x like in my previous comment? I'm not sure about this because I saw some messages from gradle that in the scripts were used some deprecated stuff. I'm not an Android developer. Please help.

i have the same warnings and the same version of SDk and NDK, but my gradle version is set to 3.6.1 and if i chaged it i've got errors. My problem here that i cant see images in my emulator when i runthe application. Please help me!

@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found in release: 2.2 Found to occur in 2.2 found in release: 2.5 Found to occur in 2.5 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically t: gradle "flutter build" and "flutter run" on Android team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests