【问题标题】:Warning: Mapping new ns to old ns and emulator stopping abruptly警告:将新 ns 映射到旧 ns 和模拟器突然停止
【发布时间】:2021-10-17 17:43:53
【问题描述】:

升级到北极狐后,我收到以下错误,即使模拟器正在运行但有时会突然停止。 这是什么错误? 我怎样才能摆脱这个?

我正在使用从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!

错误:

在调试模式下在 sdk gphone x86 上启动 lib\main.dart... 正在运行 Gradle 任务 'assembleDebug'... 警告:映射新的 ns http://schemas.android.com/repository/android/common/02 给老 ns http://schemas.android.com/repository/android/common/01 警告: 映射新的 ns http://schemas.android.com/repository/android/generic/02 给老 ns http://schemas.android.com/repository/android/generic/01 警告: 映射新的 ns http://schemas.android.com/sdk/android/repo/addon2/02 致老 ns http://schemas.android.com/sdk/android/repo/addon2/01 警告:映射新的 ns http://schemas.android.com/sdk/android/repo/repository2/02 给老 ns http://schemas.android.com/sdk/android/repo/repository2/01 警告: 映射新的 ns http://schemas.android.com/sdk/android/repo/sys-img2/02 致老 nshttp://schemas.android.com/sdk/android/repo/sys-img2/01 √ 构建 build\app\outputs\flutter-apk\app-debug.apk。安装 build\app\outputs\flutter-apk\app.apk... 调试服务监听 ws://127.0.0.1:57467/XzCZTOeqyQs=/ws 同步文件到设备sdk 手机 x86...

【问题讨论】:

标签: flutter android-studio dart schema flutter-dependencies


【解决方案1】:

我遇到了类似的问题。有两件事对我有用。

  1. 将我的 gradle-wrapper.properties 文件中的 gradle 版本更新为最新的可用版本
  2. 将我的 /android/build.gradle 文件中的 gradle 插件版本更新为最新的可用版本

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'
}

试试这些,看看它是否有效!

【讨论】:

    猜你喜欢
    • 2021-10-06
    • 2021-06-17
    • 2021-11-17
    • 2021-08-11
    • 2022-07-14
    • 2022-10-25
    • 2021-10-27
    • 1970-01-01
    • 2021-10-22
    相关资源
    最近更新 更多