gpt4 book ai didi

ios - Flutter构建ios错误: Encountered error while building for device

转载 作者:行者123 更新时间:2023-12-05 00:23:31 38 4
gpt4 key购买 nike

我尝试通过 flutter build ios 为 ios 构建我的应用程序时遇到错误.该错误与 flutter_tools 有关包。我试图清理我的项目:

  • flutter clean
  • 删除 Podfile.lock并重新运行 pod installios/目录
  • 删除 ios/Pods目录

  • 我不知道该怎么做。这是我的整个错误日志:
    [+1019 ms] "flutter ios" took 14,767ms.
    [ +4 ms] Encountered error while building for device.
    [ +2 ms]
    #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
    #1 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:256:7)
    <asynchronous suspension>
    #2 FlutterCommand.verifyThenRunCommand
    (package:flutter_tools/src/runner/flutter_command.dart:1157:12)
    <asynchronous suspension>
    #3 FlutterCommand.run.<anonymous closure>
    (package:flutter_tools/src/runner/flutter_command.dart:1009:27)
    <asynchronous suspension>
    #4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    #5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
    <asynchronous suspension>
    #6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
    <asynchronous suspension>
    #7 FlutterCommandRunner.runCommand.<anonymous closure>
    (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
    <asynchronous suspension>
    #8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    #9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
    <asynchronous suspension>
    #10 FlutterCommandRunner.runCommand
    (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
    <asynchronous suspension>
    #11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
    <asynchronous suspension>
    #12 run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)
    <asynchronous suspension>
    #13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    #14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
    <asynchronous suspension>
    #15 runInContext (package:flutter_tools/src/context_runner.dart:73:10)
    <asynchronous suspension>
    #16 main (package:flutter_tools/executable.dart:90:3)
    <asynchronous suspension>


    [ +196 ms] ensureAnalyticsSent: 107ms
    [ ] Running shutdown hooks
    [ ] Shutdown hook priority 4
    [ ] Shutdown hooks complete
    [ ] exiting with code 1
    这是我的 flutter doctor --verbose :
    [✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-x64, locale en-GB)
    • Flutter version 2.0.1 at /Users/ovidiuusvat/Flutter/flutter
    • Framework revision c5a4b4029c (4 days ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/ovidiuusvat/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

    [✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

    [✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

    [✓] Connected device (3 available)
    • SM G970F (mobile) • RF8MA07GHKP • android-arm64 •
    Android 11 (API 30)
    • iPad Pro (12.9-inch) (4th generation) (mobile) • 7E3ECED2-13E7-465A-A1A1-077EF6EFFEE9 • ios •
    com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web) • chrome • web-javascript •
    Google Chrome 88.0.4324.192

    • No issues found!

    最佳答案

    对我来说,您的错误的解决方案是 flutter create .

    关于ios - Flutter构建ios错误: Encountered error while building for device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66533488/

    38 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com