找不到Flutter构建失败的'UserAgent.h'文件 [英] Flutter build failed 'UserAgent.h' file not found
问题描述
项目无法使用firebase_crashlytics构建或调试。在我的Mac中,我已将最新版本更新为Flutter,但是我们正在部署该应用的计算机的版本较低(Flutter 1.9.1 hotfix-5)。因此,我尝试了以下操作:
Project cannot build or debug with firebase_crashlytics. In my mac I've updated to Flutter latest but the machine we are deploying the app have lower version (Flutter 1.9.1 hotfix-5). So I tried below things:
-
flutter pub缓存修复
-
干净整洁
- 删除Podfile.lock和
ios / pod安装
flutter pub cache repair
flutter clean
- deleting Podfile.lock and
ios/pod install
但是没有运气。
#import "UserAgent.h"
^~~~~~~~~~~~~
1 error generated.
有没有暂时不升级的解决方案?
Is there any solution without upgrading flutter for the time being?
推荐答案
我快到了,我想即使我清理了颤振和 pod install
也不会清除所有内容。我只需要执行以下步骤:
I was almost there, I think even if I clean the flutter and pod install
will not clear everything. I just had to do below steps:
-
扑打干净
- 删除Podfile.lock
-
cd ios
-
pod取消集成
//或不执行上述步骤即可进行cd ios / pod取消集成
-
pod安装
Flutter clean
- Delete Podfile.lock
cd ios
pod deintegrate
// or you can do **cd ios/pod deintegrate** without above step
pod install
如果仍然无法执行。请关闭 .xcworkspace
和podfile.lock,然后再次执行最后两步,并打开新生成的 .xcworkspace
和产品->
If this still didnt work. Please close .xcworkspace
and podfile.lock then do last two step again and open newly generated .xcworkspace
and Product -> build.
如果尚未解决,请在下面添加评论(我已经解决了许多此类问题)。
为此检查创建了以下问题:带有Firestore的问题1 和问题2与crashlytics 。
Check here are created issues for this: issue 1 with firestore and issue 2 with crashlytics.
这篇关于找不到Flutter构建失败的'UserAgent.h'文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!