Windows Flutter doctor 解决Exception: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string

刚刚发布了Flutter 3.0,今天用Windows搭了一下Flutter 开发环境,flutter doctor发生以下错误:

Visual Studio - develop for Windows (the doctor check crashed)
    X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    X Exception: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string: [
        {
          "instanceId": "2116e423",
          "installDate": "2022-05-13T08:13:46Z",
          "installationName": "VisualStudio/16.11.14+32428.217",
          "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community",
          "installationVersion": "16.11.32428.217",
          "productId": "Microsoft.VisualStudio.Product.Community",
          "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe",
          "state": 4294967295,
          "isComplete": true,
          "isLaunchable": true,
          "isPrerelease": false,
          "isRebootRequired": false,
          "displayName": "Visual Studio Community 2019",
          "description": "����ǿ��� IDE����ѧ��������Դ��������ߺ͸������ʹ��",
          "channelId": "VisualStudio.16.Release",
          "channelUri": "https://aka.ms/vs/16/release/channel",
          "enginePath": "C:\\Program Files (x86)\\Microsoft Visual
          Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
          "installedChannelUri": "https://aka.ms/vs/16/release/channel",
          "releaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.11#16.11.14",
          "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
          "updateDate": "2022-05-13T08:13:46.946287Z",
          "catalog": {
            "buildBranch": "d16.11",
            "buildVersion": "16.11.32428.217",
            "id": "VisualStudio/16.11.14+32428.217",
            "localBuild": "build-lab",
            "manifestName": "VisualStudio",
            "manifestType": "installer",
            "productDisplayVersion": "16.11.14",
            "productLine": "Dev16",
            "productLineVersion": "2019",
            "productMilestone": "RTW",
            "productMilestoneIsPreRelease": "False",
            "productName": "Visual Studio",
            "productPatchVersion": "14",
            "productPreReleaseMilestoneSuffix": "1.0",
            "productSemanticVersion": "16.11.14+32428.217",
            "requiredEngineVersion": "2.11.69.53063"
          },
          "properties": {
            "campaignId": "2030:f50a70ae-a775-440e-af4e-71283de70753",
            "channelManifestId": "VisualStudio.16.Release/16.11.14+32428.217",
            "nickname": "",
            "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
          }
        }
      ]
      . The Flutter team would greatly appreciate if you could file a bug explaining exactly what you were doing when
      this happened:
      https://github.com/flutter/flutter/issues/new/choose
      The source bytes were:
      [91, 13, 10, 32, 32, 123, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 110, 99, 101, 73, 100, 34, 58, 32,
      34, 50, 49, 49, 54, 101, 52, 50, 51, 34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 68, 97,      116, 101, 34, 58, 32, 34, 50, 48, 50, 50, 45, 48, 53, 45, 49, 51, 84, 48, 56, 58, 49, 51, 58, 52, 54, 90, 34, 44,
      13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111, 110, 78, 97, 109, 101, 34, 58,
      32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 47, 49, 54, 46, 49, 49, 46, 49, 52, 43, 51, 50,
      52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105,
      111, 110, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105, 108,
      101, 115, 32, 40, 120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105, 115, 117, 97,
      108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 50, 48, 49, 57, 92, 92, 67, 111, 109, 109, 117, 110, 105, 116, 121,
      34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111, 110, 86, 101, 114, 115,
      105, 111, 110, 34, 58, 32, 34, 49, 54, 46, 49, 49, 46, 51, 50, 52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32,      32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 73, 100, 34, 58, 32, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116,
      46, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 80, 114, 111, 100, 117, 99, 116, 46, 67, 111,
      109, 109, 117, 110, 105, 116, 121, 34, 44, 13, 10, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 80, 97,
      116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105, 108, 101, 115, 32, 40,
      120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116,
      117, 100, 105, 111, 92, 92, 50, 48, 49, 57, 92, 92, 67, 111, 109, 109, 117, 110, 105, 116, 121, 92, 92, 67, 111,
      109, 109, 111, 110, 55, 92, 92, 73, 68, 69, 92, 92, 100, 101, 118, 101, 110, 118, 46, 101, 120, 101, 34, 44, 13,
      10, 32, 32, 32, 32, 34, 115, 116, 97, 116, 101, 34, 58, 32, 52, 50, 57, 52, 57, 54, 55, 50, 57, 53, 44, 13, 10,
      32, 32, 32, 32, 34, 105, 115, 67, 111, 109, 112, 108, 101, 116, 101, 34, 58, 32, 116, 114, 117, 101, 44, 13, 10,
      32, 32, 32, 32, 34, 105, 115, 76, 97, 117, 110, 99, 104, 97, 98, 108, 101, 34, 58, 32, 116, 114, 117, 101, 44, 13,      10, 32, 32, 32, 32, 34, 105, 115, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 34, 58, 32, 102, 97, 108, 115,
      101, 44, 13, 10, 32, 32, 32, 32, 34, 105, 115, 82, 101, 98, 111, 111, 116, 82, 101, 113, 117, 105, 114, 101, 100,
      34, 58, 32, 102, 97, 108, 115, 101, 44, 13, 10, 32, 32, 32, 32, 34, 100, 105, 115, 112, 108, 97, 121, 78, 97, 109,      101, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 67, 111, 109, 109, 117, 110,      105, 116, 121, 32, 50, 48, 49, 57, 34, 44, 13, 10, 32, 32, 32, 32, 34, 100, 101, 115, 99, 114, 105, 112, 116, 105,      111, 110, 34, 58, 32, 34, 185, 166, 196, 220, 199, 191, 180, 243, 181, 196, 32, 73, 68, 69, 163, 172, 185, 169,
      209, 167, 201, 250, 161, 162, 191, 170, 183, 197, 212, 180, 180, 250, 194, 235, 178, 206, 211, 235, 213, 223, 186,      205, 184, 246, 200, 203, 195, 226, 183, 209, 202, 185, 211, 195, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 104, 97,
      110, 110, 101, 108, 73, 100, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 49, 54,
      46, 82, 101, 108, 101, 97, 115, 101, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 104, 97, 110, 110, 101, 108, 85, 114,      105, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 97, 107, 97, 46, 109, 115, 47, 118, 115, 47, 49, 54, 47,      114, 101, 108, 101, 97, 115, 101, 47, 99, 104, 97, 110, 110, 101, 108, 34, 44, 13, 10, 32, 32, 32, 32, 34, 101,
      110, 103, 105, 110, 101, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32,
      70, 105, 108, 101, 115, 32, 40, 120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105,
      115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 73, 110, 115, 116, 97, 108, 108, 101, 114, 92, 92,
      114, 101, 115, 111, 117, 114, 99, 101, 115, 92, 92, 97, 112, 112, 92, 92, 83, 101, 114, 118, 105, 99, 101, 72,
      117, 98, 92, 92, 83, 101, 114, 118, 105, 99, 101, 115, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 86,
      105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 83, 101, 116, 117, 112, 46, 83, 101, 114, 118, 105, 99,
      101, 34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 101, 100, 67, 104, 97, 110, 110, 101,
      108, 85, 114, 105, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 97, 107, 97, 46, 109, 115, 47, 118, 115,
      47, 49, 54, 47, 114, 101, 108, 101, 97, 115, 101, 47, 99, 104, 97, 110, 110, 101, 108, 34, 44, 13, 10, 32, 32, 32,      32, 34, 114, 101, 108, 101, 97, 115, 101, 78, 111, 116, 101, 115, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47,      47, 100, 111, 99, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 101, 110, 45, 117,
      115, 47, 118, 105, 115, 117, 97, 108, 115, 116, 117, 100, 105, 111, 47, 114, 101, 108, 101, 97, 115, 101, 115, 47,      50, 48, 49, 57, 47, 114, 101, 108, 101, 97, 115, 101, 45, 110, 111, 116, 101, 115, 45, 118, 49, 54, 46, 49, 49,
      35, 49, 54, 46, 49, 49, 46, 49, 52, 34, 44, 13, 10, 32, 32, 32, 32, 34, 116, 104, 105, 114, 100, 80, 97, 114, 116,      121, 78, 111, 116, 105, 99, 101, 115, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 103, 111, 46, 109, 105,      99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 102, 119, 108, 105, 110, 107, 47, 63, 76, 105, 110, 107,
      73, 100, 61, 54, 54, 48, 57, 48, 57, 34, 44, 13, 10, 32, 32, 32, 32, 34, 117, 112, 100, 97, 116, 101, 68, 97, 116,      101, 34, 58, 32, 34, 50, 48, 50, 50, 45, 48, 53, 45, 49, 51, 84, 48, 56, 58, 49, 51, 58, 52, 54, 46, 57, 52, 54,
      50, 56, 55, 90, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 97, 116, 97, 108, 111, 103, 34, 58, 32, 123, 13, 10, 32,
      32, 32, 32, 32, 32, 34, 98, 117, 105, 108, 100, 66, 114, 97, 110, 99, 104, 34, 58, 32, 34, 100, 49, 54, 46, 49,
      49, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 98, 117, 105, 108, 100, 86, 101, 114, 115, 105, 111, 110, 34, 58,
      32, 34, 49, 54, 46, 49, 49, 46, 51, 50, 52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34,
      105, 100, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 47, 49, 54, 46, 49, 49, 46, 49,      52, 43, 51, 50, 52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 108, 111, 99, 97, 108, 66,      117, 105, 108, 100, 34, 58, 32, 34, 98, 117, 105, 108, 100, 45, 108, 97, 98, 34, 44, 13, 10, 32, 32, 32, 32, 32,
      32, 34, 109, 97, 110, 105, 102, 101, 115, 116, 78, 97, 109, 101, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83,
      116, 117, 100, 105, 111, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 109, 97, 110, 105, 102, 101, 115, 116, 84,
      121, 112, 101, 34, 58, 32, 34, 105, 110, 115, 116, 97, 108, 108, 101, 114, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32,      34, 112, 114, 111, 100, 117, 99, 116, 68, 105, 115, 112, 108, 97, 121, 86, 101, 114, 115, 105, 111, 110, 34, 58,
      32, 34, 49, 54, 46, 49, 49, 46, 49, 52, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99,
      116, 76, 105, 110, 101, 34, 58, 32, 34, 68, 101, 118, 49, 54, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112,
      114, 111, 100, 117, 99, 116, 76, 105, 110, 101, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 50, 48, 49, 57,
      34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 77, 105, 108, 101, 115, 116, 111,
      110, 101, 34, 58, 32, 34, 82, 84, 87, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99,
      116, 77, 105, 108, 101, 115, 116, 111, 110, 101, 73, 115, 80, 114, 101, 82, 101, 108, 101, 97, 115, 101, 34, 58,
      32, 34, 70, 97, 108, 115, 101, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 78,
      97, 109, 101, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 34, 44, 13, 10, 32, 32,      32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 80, 97, 116, 99, 104, 86, 101, 114, 115, 105, 111, 110, 34,
      58, 32, 34, 49, 52, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 80, 114, 101,
      82, 101, 108, 101, 97, 115, 101, 77, 105, 108, 101, 115, 116, 111, 110, 101, 83, 117, 102, 102, 105, 120, 34, 58,
      32, 34, 49, 46, 48, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 83, 101, 109,
      97, 110, 116, 105, 99, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 54, 46, 49, 49, 46, 49, 52, 43, 51,
      50, 52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 114, 101, 113, 117, 105, 114, 101,
      100, 69, 110, 103, 105, 110, 101, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 50, 46, 49, 49, 46, 54, 57,
      46, 53, 51, 48, 54, 51, 34, 13, 10, 32, 32, 32, 32, 125, 44, 13, 10, 32, 32, 32, 32, 34, 112, 114, 111, 112, 101,
      114, 116, 105, 101, 115, 34, 58, 32, 123, 13, 10, 32, 32, 32, 32, 32, 32, 34, 99, 97, 109, 112, 97, 105, 103, 110,      73, 100, 34, 58, 32, 34, 50, 48, 51, 48, 58, 102, 53, 48, 97, 55, 48, 97, 101, 45, 97, 55, 55, 53, 45, 52, 52, 48,      101, 45, 97, 102, 52, 101, 45, 55, 49, 50, 56, 51, 100, 101, 55, 48, 55, 53, 51, 34, 44, 13, 10, 32, 32, 32, 32,
      32, 32, 34, 99, 104, 97, 110, 110, 101, 108, 77, 97, 110, 105, 102, 101, 115, 116, 73, 100, 34, 58, 32, 34, 86,
      105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 49, 54, 46, 82, 101, 108, 101, 97, 115, 101, 47, 49, 54,
      46, 49, 49, 46, 49, 52, 43, 51, 50, 52, 50, 56, 46, 50, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 110,
      105, 99, 107, 110, 97, 109, 101, 34, 58, 32, 34, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 115, 101, 116, 117,
      112, 69, 110, 103, 105, 110, 101, 70, 105, 108, 101, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114,
      111, 103, 114, 97, 109, 32, 70, 105, 108, 101, 115, 32, 40, 120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115,
      111, 102, 116, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 73, 110, 115, 116, 97,
      108, 108, 101, 114, 92, 92, 115, 101, 116, 117, 112, 46, 101, 120, 101, 34, 13, 10, 32, 32, 32, 32, 125, 13, 10,
      32, 32, 125, 13, 10, 93, 13, 10]

尝试了2019,2022两个版本的Visual Studio,反复重装,百度了很久也没有解决问题。虽然不影响开发,但着实难受。

最后在github上找到了解决方案:https://github.com/flutter/flutter/issues/103622

大概意思就是VisualStudio安装程序提供的vswhere已经过时,在utf8开关上有个BUG,升级vswhere即可解决。

首先下载最新的vswhere 3.0.2:https://github.com/microsoft/vswhere/releases/tag/3.0.2

找到VisualStudio安装程序的安装目录,我的是C:\Program Files (x86)\Microsoft Visual Studio\Installer

找到vswhere.exe,将刚下载的新版本覆盖。重新运行flutter doctor

No issues found!

 

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇