[ Solved ] Warning Mapping new ns to old ns

0
28
Warning Mapping new ns to old ns

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

How to Fix warning: mapping new ns to old ns

Fix warning mapping new ns to old ns in Android Studio

1 – in gradle-wrapper.properties change distributionUrl gradle version to gradle-7.3.3

change gradle version to gradle-7.3.3

warning mapping new ns to old ns

2 – Click File then Project Structure change Android Gradle Plugin Version to 7.0.3

change Android Gradle Plugin Version to 7.0.3

warning mapping new ns to old ns

After that Build The App .

 

Fix warning mapping new ns to old ns in Unity

  1. Download Gradle 7.3.3 then go to Edit then choose Preferences then in the External Tools scroll down to Gradle and Paste Gradle Folder Path .
  2. Press File then Build Settings then Player Settings and in the Publishing Settings check box Custom Base Gradle Template and check box Custom Gradle Properties Template .
  3. go to your Project Folder then choose Assets Folder then Plugins Folder Then Android Folder then open baseProjectTemplate file by Notepad editor or any other editor and and remove this line
    // GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
    then change classpath to

    classpath 'com.android.tools.build:gradle:7.0.3'
  4. Download Java JDK 18 .
  5. Choose Edit then Preferences then External Tools and scroll down to JDK and Paste JDK path folder
    C:\Program Files\Java\jdk-18.0.2
  6. go to your Project Folder then choose Assets Folder then Plugins Folder Then Android Folder then open gradleTemplate file by Notepad editor or any other editor and add this line in first line
    org.gradle.java.home=C:\\Program Files\\Java\\jdk-18.0.2

    then comment this line //android.enableR8=**MINIFY_WITH_R_EIGHT**

  7. Now Build Project .