ios - 错误 : Build input file cannot be found: '/Users/GoogleService-Info.plist' (in target 'Runner' from project 'Runner' )

标签 ios xcode flutter flutter-build

我正在尝试使用 Flutter 项目的 iOS 构建。无论我尝试什么,它都会给我以下错误:

error: Build input file cannot be found: '/Users/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')


这是我试图构建的命令集:
  • flutter pub 获取
  • flutter 干净
  • flutter build ios(这会导致上述错误)

  • 这是我的 flutter 医生输出
    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 the 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

    最佳答案

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

    关于ios - 错误 : Build input file cannot be found: '/Users/GoogleService-Info.plist' (in target 'Runner' from project 'Runner' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60890976/

    相关文章:

    ios - Swift NSCoding 中的 EXC_BAD_INSTRUCTION

    ios - Swift 5 中在其自身初始值内使用的变量

    firebase - Firebase ML套件即使在Flutter应用中也为相同的面部提供了不同的面部跟踪ID

    flutter - 使用 GestureDetector 捕捉 MaterialButton child 的手势

    ios - 有什么方法可以在 iOS 的 CoreData 中存储一周前的数据(比如 CMStepCounter(7 天数据)中的步行步数)?

    iphone - 自定义字体问题

    objective-c - 解析 Objective C 中几个级别的 JSON

    ios 在应用程序中访问负载配置文件

    ios - CGRect Intersects Rect 在悬停时改变图像

    flutter - 你能改变 flutter 文本主题吗?