今天Flutter項(xiàng)目打包iOS的時(shí)候遇到了這樣一個(gè)錯(cuò)誤
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>
解決辦法:
先確定在項(xiàng)目目錄/ios/Flutter目錄下砸琅,是否有Debug.xcconfig明棍、Release.xcconfig
如果有少了就要添加,如果有的話沸版,就確定一下內(nèi)容视粮,正確內(nèi)容應(yīng)該如下:
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"