美文网首页
Flutter Error (Xcode): unable to

Flutter Error (Xcode): unable to

作者: Jagtu | 来源:发表于2023-06-14 16:44 被阅读0次

    今天Flutter项目打包iOS的时候遇到了这样一个错误

     Failed to build iOS app
    [        ] Error (Xcode): unable to open configuration settings file
    
    /Users/jagtu/Documents/WorkSpaces/flutter/other/jdyun-woyinxiang-app/trunk/wo_yi
               nxiang/ios/Flutter/Release.xcconfig:0:0
               
    [        ] Error (Xcode): Unable to load contents of file list: '/Target Support
    
    Files/Pods-Runner/Pods-Runner-frameworks-Release-input-files.xcfilelist'
               
    [        ] Error (Xcode): Unable to load contents of file list: '/Target Support
    
    Files/Pods-Runner/Pods-Runner-frameworks-Release-output-files.xcfilelist'
               
    [   +1 ms] "flutter ios" took 22,460ms.
    [   +1 ms] Encountered error while building for device.
    [        ] 
               #0      throwToolExit
    (package:flutter_tools/src/base/common.dart:10:3)
               #1      _BuildIOSSubCommand.runCommand
               (package:flutter_tools/src/commands/build_ios.dart:665:7)
               <asynchronous suspension>
               #2      FlutterCommand.run.<anonymous closure>
               (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
               <asynchronous suspension>
               #3      AppContext.run.<anonymous closure>
               (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #4      CommandRunner.runCommand
    (package:args/command_runner.dart:212:13)
               <asynchronous suspension>
               #5      FlutterCommandRunner.runCommand.<anonymous closure>
               (package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
               <asynchronous suspension>
               #6      AppContext.run.<anonymous closure>
               (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #7      FlutterCommandRunner.runCommand
               (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
               <asynchronous suspension>
               #8      run.<anonymous closure>.<anonymous closure>
               (package:flutter_tools/runner.dart:91:9)
               <asynchronous suspension>
               #9      AppContext.run.<anonymous closure>
               (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #10     main (package:flutter_tools/executable.dart:91:3)
               <asynchronous suspension>
               
    
    

    解决办法:

    先确定在项目目录/ios/Flutter目录下,是否有Debug.xcconfig、Release.xcconfig
    如果有少了就要添加,如果有的话,就确定一下内容,正确内容应该如下:

    Release.xcconfig

    #include? "../Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
    #include "Generated.xcconfig"
    

    Debug.xcconfig

    #include? "../Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
    #include "Generated.xcconfig"
    

    相关文章

      网友评论

          本文标题:Flutter Error (Xcode): unable to

          本文链接:https://www.haomeiwen.com/subject/seckydtx.html