在 iOS 上运行应用程序时“路径中的 plist 文件不存在”

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

我在 iOS 上运行 flutter 项目时遇到问题。我到处搜索(并尝试了其他 SO 线程的解决方案),似乎找不到如何解决此错误。我收到错误:

Error running pod install
Error launching application on iPhone 15 Pro Max.

如果我向上滚动一点,我会发现问题似乎与缺少的 plist 文件有关:

[!] An error occurred while processing the post-install hook of the Podfile.
[!] The plist file at path `/Users/user1/StudioProjects/flutterproject/ios/Pods/Pods.xcodeproj/project.pbxproj` doesn't exist.

这是控制台日志的较长版本:https://pastebin.com/s5JqKAcY

这是我冗长的扑动医生:

[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-LV)
• Flutter version 3.19.5 on channel stable at /Users/user1/flutterdev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (7 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/user1/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] Connected device (3 available)
• iPhone 15 Pro Max (mobile) • 3F02384A-7C4B-4D94-8BB0-97810C2C3461 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop)            • macos                                • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
• Chrome (web)               • chrome                               • web-javascript • Google Chrome 124.0.6367.158

[✓] Network resources
• All expected network resources are available.

• No issues found!

flutter项目正在使用flutter版本

3.16.5

如果我在 XCode 中打开项目并尝试运行它,它会产生以下错误:

Unable to load contents of file list: '/Users/user1/StudioProjects/lflutterproject/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources-Debug-input-files.xcfilelist'

我当前的 ruby 版本是

3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
和 cocoapods-
1.15.2

如果我只是尝试在项目的 ios 文件夹中运行

pod update
,也会弹出此错误,所以我认为这可能与 cocoapods 有关,但我根本不是这方面的专家。

我可以在 Android 设备和模拟器上运行该应用程序,我还可以在 iOS 上构建和运行 iOS 应用程序以及新的 flutter 项目。

感谢任何帮助,我目前没有想法。

ios flutter cocoapods
1个回答
0
投票

我真的不确定我是如何解决我的问题的,因为我已经尝试解决它好几个星期了,但似乎最终做到的是这些命令的组合(没有特定的顺序):

flutter clean
sudo gem install cocoapods
flutter pub get

我不会解决这个问题,因为我无法确定确切的解决方案,也许有人知道问题到底是什么。 上次我遇到这个错误,按照@Shivbaba儿子帮我再次找到的这个Github问题报告,解决了。

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