错误:找不到构建输入文件:'/Users/GoogleService-Info.plist'(在项目'Runner'中的目标'Runner'中)

问题描述 投票:2回答:1

我正在尝试使用Flutter项目的iOS版本。不管我尝试什么,它只会给我以下错误:

错误:找不到构建输入文件:'/Users/GoogleService-Info.plist'(在项目'Runner'中的目标'Runner'中)

这是我尝试使用的构建命令集:

  • flutter pub get
  • 扑通干净
  • flutter构建ios(这会导致上述错误)

这是我扑扑的医生的输出

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.16.3-pre.67, on Mac OS X 10.15.3 19D76, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.43.2)
[!] Connected device

! Doctor found issues in 1 category.

flutter build ios --verbose结束,出现以下错误:

Encountered error while building for device.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:93:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:722:18)
#3      _rootRunUnary (dart:async/zone.dart:1155:38)
#4      _CustomZone.runUnary (dart:async/zone.dart:1048:19)
#5      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#7      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#8      Future._completeWithValue (dart:async/future_impl.dart:526:5)
#9      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#10     _rootRun (dart:async/zone.dart:1147:13)
#11     _CustomZone.run (dart:async/zone.dart:1040:19)
#12     _CustomZone.runGuarded (dart:async/zone.dart:942:7)
#13     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:982:23)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

这里是文件夹结构的图像。如您所见,没有保存Google plist的“用户”文件夹。因此,令人困惑的是,脚本为何会尝试从不存在的目录中复制plist。任何解决此问题的建议将不胜感激。 TIA:-)

enter image description here

ios flutter dart build plist
1个回答
1
投票

删除GoogleService-Info.plist,然后再次使用Xcode将文件添加到目录中,然后选择copy items if neededadd to target复选标记。我希望这能解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.