• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

flutter window 11 安装问题

武飞扬头像
dragoonnet
帮助1

  1. Unable to confirm if installed Windows version is 10 or greater

flutter\packages\flutter_tools\lib\src\windows\windows_version_validator.dart

  1.  
    // Copyright 2014 The Flutter Authors. All rights reserved.
  2.  
    // Use of this source code is governed by a BSD-style license that can be
  3.  
    // found in the LICENSE file.
  4.  
     
  5.  
    import 'package:process/process.dart';
  6.  
     
  7.  
    import '../base/io.dart';
  8.  
    import '../doctor_validator.dart';
  9.  
     
  10.  
    // FIX #1 - Remove everything from line 10 to 20 in original source code.
  11.  
     
  12.  
    /// Validator for supported Windows host machine operating system version.
  13.  
    class WindowsVersionValidator extends DoctorValidator {
  14.  
    const WindowsVersionValidator({required ProcessManager processManager})
  15.  
    : _processManager = processManager,
  16.  
    super('Windows Version');
  17.  
     
  18.  
    final ProcessManager _processManager;
  19.  
     
  20.  
    @override
  21.  
    Future<ValidationResult> validate() async {
  22.  
     
  23.  
    // FIX #2 - Replace 'systeminfo' by 'ver' command
  24.  
    final ProcessResult result =
  25.  
    await _processManager.run(<String>['ver'], runInShell: true);
  26.  
     
  27.  
    if (result.exitCode != 0) {
  28.  
    return const ValidationResult(
  29.  
    ValidationType.missing,
  30.  
    <ValidationMessage>[],
  31.  
    statusInfo: 'Exit status from running `systeminfo` was unsuccessful',
  32.  
    );
  33.  
    }
  34.  
     
  35.  
    final String resultStdout = result.stdout as String;
  36.  
     
  37.  
    // FIX #3 - Remove brackets from output
  38.  
    final String resultAdjusted = resultStdout.replaceAll('[','').replaceAll(']','');
  39.  
     
  40.  
    // FIX #4 - Split the output at spaces, and get Windows version at position 3.
  41.  
    // Split again at dots and get the major version at position 0.
  42.  
    // Cast the output to int.
  43.  
    final int winver = int.parse(resultAdjusted.split(' ').elementAt(3).split('.').elementAt(0));
  44.  
     
  45.  
    // Use the string split method to extract the major version
  46.  
    // and check against the [kUnsupportedVersions] list
  47.  
    final ValidationType windowsVersionStatus;
  48.  
    final String statusInfo;
  49.  
     
  50.  
    // FIX #5 - Check if Windows major version is greater than 10.
  51.  
    // Succeeds if true.
  52.  
    if (winver >= 10) {
  53.  
    windowsVersionStatus = ValidationType.installed;
  54.  
    statusInfo = 'Installed version of Windows is version 10 or higher';
  55.  
    } else {
  56.  
    windowsVersionStatus = ValidationType.missing;
  57.  
    statusInfo =
  58.  
    'Unable to confirm if installed Windows version is 10 or greater';
  59.  
    }
  60.  
     
  61.  
    return ValidationResult(
  62.  
    windowsVersionStatus,
  63.  
    const <ValidationMessage>[],
  64.  
    statusInfo: statusInfo,
  65.  
    );
  66.  
    }
  67.  
    }
学新通
  1. cmdline-tools component is missing

android Studio\SDK manager\SDK Tools\Android SDK Command-line Tools(lastest) Not Installed

  1. Android license status unknown

Android Studio安装目\jbr 文件复制到 jre 目录

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgjcihf
系列文章
更多 icon
同类精品
更多 icon
继续加载