Ios 颤振“未找到蓝色^0.6.3文件”“导入”;谷歌/protobuf/Any.pbobjc.h“;颤振

Ios 颤振“未找到蓝色^0.6.3文件”“导入”;谷歌/protobuf/Any.pbobjc.h“;颤振,ios,flutter,flutter-dependencies,Ios,Flutter,Flutter Dependencies,将flutter_blue:^0.6.3添加到我的全新项目依赖项时,出现以下错误: Xcode build done. 6.0s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ While building module 'protobuf' impor

将flutter_blue:^0.6.3添加到我的全新项目依赖项时,出现以下错误:

Xcode build done.                                            6.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    While building module 'protobuf' imported from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBArray.h:33:
    In file included from <module-includes>:1:
    In file included from /Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h:28:
    In file included from /Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:44:
    /Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:44:10: fatal error: 'google/protobuf/Any.pbobjc.h' file not found
     #import "google/protobuf/Any.pbobjc.h"
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/Classes/FlutterBluePlugin.m:6:
    In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/Flutterblue.pbobjc.h:13:
    In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBProtocolBuffers.h:33:
    /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBArray.h:33:9: fatal error: could not build module 'protobuf'
    #import "GPBRuntimeTypes.h"
     ~~~~~~~^~~~~~~~~~~~~~~~~~~
    2 errors generated.
    note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Xcode构建完成。6.0秒
无法生成iOS应用程序
Xcode生成的错误输出:
↳
**构建失败**
Xcode的输出:
↳
在构建从/Users/johanalbrectsen/.pub cache/hosted/pub.dartlang.org/flatter_blue-0.6.3/ios/gen/GPBArray.h导入的模块“protobuf”时:
包含在以下文件中:1:
文件包括在/Users/johanalbrectsen/AndroidStudioProjects/flatter_blue_test/ios/Pods/Target Support Files/Protobuf/Protobuf umbrane.h:28:
文件包括在/Users/johanalbrectsen/AndroidStudioProjects/flatter_blue_test/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:44:
/Users/johanalbrectsen/AndroidStudioProjects/flatter_blue_test/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:44:10:致命错误:“未找到google/Protobuf/Any.pbobjc.h”文件
#导入“google/protobuf/Any.pbobjc.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
生成1个错误。
文件包括在/Users/johanalbrectsen/.pub cache/hosted/pub.dartlang.org/flatter_blue-0.6.3/ios/Classes/flatterblueplugin.m:6:
文件包括在/Users/johanalbrectsen/.pub cache/hosted/pub.dartlang.org/flatter_blue-0.6.3/ios/gen/flatterblue.pbobjc.h:13:
文件包括在/Users/johanalbrectsen/.pub cache/hosted/pub.dartlang.org/flatter_blue-0.6.3/ios/gen/GPBProtocolBuffers.h:33:
/Users/johanalbrectsen/.pub cache/hosted/pub.dartlang.org/flatter_blue-0.6.3/ios/gen/GPBArray.h:33:9:致命错误:无法生成模块“protobuf”
#导入“GPBRuntimeTypes.h”
~~~~~~~^~~~~~~~~~~~~~~~~~~
产生2个错误。
注意:使用新构建系统注意:规划构建注意:构建构建描述
无法为模拟器生成应用程序。
在iPhone 11 Pro Max上启动应用程序时出错。
你知道如何解决这个问题吗?

试试:

  • 扑通
  • 删除项目ios目录中的Pod文件夹和Podfile.lock文件
  • 吊舱安装
  • 吊舱升级,然后
  • 在项目的根目录上运行flatter

我也遇到了同样的问题,将Cocoapod降级到1.7.5对我来说很有效。

这个问题已经被讨论过了,

是的,如果以后有人遇到同样的问题,就像前面所说的,您只需通过执行以下操作将cocoapods降级到1.7.5即可:

sudo gem uninstall cocoapods --all
sudo gem install cocoapods -v 1.7.5
然后进入颤振项目,然后进入
ios
文件夹并执行以下操作:

rm -rf ./Pods
rm ./Podfile.lock
pod install --repo-update
你应该准备好出发了