当我尝试在xcode中运行项目时,出现以下错误:
'auto_orientation/AutoOrientationPlugin.h' file not found.
如果删除此插件,它将转到下一个插件,并且该插件的.h文件失败,以此类推。
以前,此问题仅在我尝试进行存档时才发生,但始终可以正常运行。现在它甚至不会运行。
关于这一点有很多线程,我已经遍历了这些线程,但是到目前为止,仍然找不到任何可行的建议。
Pubspec.yaml文件,根据要求:
name: app_name
description: My application.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 6.0.0
environment:
sdk: ">=2.3.0-dev.0.5 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: 0.1.2
firebase_admob: 0.5.5
screen: 0.0.5
image_picker: 0.6.1
firebase_auth: 0.11.1+7
shared_preferences: 0.4.3
rflutter_alert: 1.0.2
url_launcher: 5.0.3
in_app_purchase: 0.2.0
firebase_dynamic_links: 0.4.0+4
app_review: 1.1.0+1
auto_orientation: 1.0.4
vibration: 1.2.1
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
assets:
- lib/images/
- lib/images/example1.png
- lib/images/example2.png
- lib/images/example3.png
uses-material-design: true
Cenk的屏幕截图:
最佳答案
您绝对不需要清除整个ios /文件夹。
1)flutter clean
原因
2)rm ios/Podfile.lock
3)rm -rf ios/Pods
4)rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
(或您将其设置为可居住的任何地方)
5)flutter packages get
然后运行/构建您的应用程序,但通常会这样做。
关于ios - 找不到Plugin.h文件:flutter和xcode,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/60816511/