Debasis Sil
Debasis Sil

Reputation: 631

Warning: Mapping new ns to old ns and emulator stopping abruptly

After upgrading to Arctic Fox , I am getting the following errors, even though the emulator is running but sometimes stopping abruptly. What is this error ? How can I get rid of this ?

I am using the following as copied from cmd :

    > C:\Users\Debasis>flutter doctor Doctor summary (to see all details,
    > run flutter doctor -v): [√] Flutter (Channel stable, 2.2.3, on
    > Microsoft Windows [Version 10.0.19042.1165], locale en-IN) [√] Android
    > toolchain - develop for Android devices (Android SDK version 31.0.0)
    > [√] Chrome - develop for the web [√] Android Studio [√] Connected
    > device (2 available)

• No issues found!

The Error :

Launching lib\main.dart on sdk gphone x86 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/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 √ Built build\app\outputs\flutter-apk\app-debug.apk. Installing build\app\outputs\flutter-apk\app.apk... Debug service listening on ws://127.0.0.1:57467/XzCZTOeqyQs=/ws Syncing files to device sdk gphone x86...

The Issue

SDK Platforms

SDK Tools

Upvotes: 17

Views: 23885

Answers (3)

Karun Anand
Karun Anand

Reputation: 51

I have also the same problem, when I was updated android studio. i research to fix that issue,

TODO ;

step 1 : GOTO project Folder

/android/build.gradle

to update a latest gradle version in dependencies.

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

step 2 :

/android/gradle/wrapper/gradle-wrapper.properties

here also to update a latest version of gradle

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

step 3: go to terminal and run flutter clean

step 4: and run flutter pub get

step 5: and run your project using flutter run command

one more think but that issue fix that project only. if u know fix that issue permanently please let me know,

Upvotes: 4

Shajedur Rahman Panna
Shajedur Rahman Panna

Reputation: 59

I got the same problem, but after quick research, I managed to solve the problem.

step 1: Go to this webpage: Android Gradle plugin

step 2: Copy the build.gradle plugin to version see the image here

step 3: Go to your flutter app project and open the "build.gradle" file under

your_project>android

see the image here

step 4: In that file edit dependencies.

classpath 'com.android.tools.build:gradle:<step 2 copied version>'

see the image here

step 5: Now re-run your flutter app. You might see a new error, showing

A problem occurred evaluating project ':app'. Failed to apply plugin 'com.android.internal.version-check'.

see the image here

Now follow the instructions given in that error. (highlighted area in the image)

Upvotes: 2

CP17
CP17

Reputation: 481

I had a similar issue. Two things did the trick for me.

  1. Updated the gradle version in my gradle-wrapper.properties file to the latest available version
  2. Updated the gradle plugin version in my /android/build.gradle file to the latest available version

gradle-wrapper.properties

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

/android/build.gradle

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

Give these a try and see if it works!

Upvotes: 38

Related Questions