gpt4 book ai didi

ios - flutter app 不是由 flutter build ios 运行,而是由 xcode 运行

转载 作者:行者123 更新时间:2023-12-05 08:10:55 31 4
gpt4 key购买 nike

我编写了 flutter 应用程序,我通过 xcode 打开了 ios 部分并且应用程序正在运行,但是当我通过 flutter build ios 通过 vscode 运行应用程序时,我得到了这个错误:

Automatically signing iOS for device deployment using specified development team in Xcode project: FHDGDHARTT
Running pod install... 4.1s
Running Xcode build...
Xcode build done. 4.1s
Failed to build iOS app
Error output from Xcode build:

2021-08-27 15:20:15.391 XCBBuildService[25359:181696] Failed to remove: /Users/alt/Library/Developer/Xcode/DerivedData/Runner-cwssrvwaltuodobbealdvrytptog/Build/Intermediates.noindex/XCBuildData/7c6f3b0142d0b109056c8c9053a39860-manifest.xcbuild: unlink(/Users/alt/Library/Developer/Xcode/DerivedData/Runner-cwssrvwaltuodobbealdvrytptog/Build/Intermediates.noindex/XCBuildData/7c6f3b0142d0b109056c8c9053a39860-manifest.xcbuild): No such file or directory (2)
2021-08-27 15:20:15.617 XCBBuildService[25359:181696] Failed to remove: /Users/alt/Library/Developer/Xcode/DerivedData/Runner-cwssrvwaltuodobbealdvrytptog/Build/Intermediates.noindex/XCBuildData/7c6f3b0142d0b109056c8c9053a39860-desc.xcbuild: unlink(/Users/alt/Library/Developer/Xcode/DerivedData/Runner-cwssrvwaltuodobbealdvrytptog/Build/Intermediates.noindex/XCBuildData/7c6f3b0142d0b109056c8c9053a39860-desc.xcbuild): No such file or directory (2)
** BUILD FAILED **


Xcode's output:

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project 'Pods')
error: No profiles for 'com.shavemachine.shaveMachineApp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.shavemachine.shaveMachineApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Reachability' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'TOCropViewController' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Toast' from project 'Pods')

Encountered error while building for device.
alt@alts-MacBook-Pro shave-machine-app % ff clean
Cleaning Xcode workspace... 2,742ms
Deleting build... 50ms
Deleting .dart_tool... 2ms
Deleting .packages... 0ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting Flutter.podspec... 0ms
Deleting .flutter-plugins-dependencies... 0ms
Deleting .flutter-plugins... 0ms
alt@alts-MacBook-Pro shave-machine-app % ff pub get
Running "flutter pub get" in shave-machine-app... 1,147ms
alt@alts-MacBook-Pro shave-machine-app % ff build ios
Building com.shavemachine.shaveMachineApp for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: FHDGDHARTT
Running pod install... 5.5s
Running Xcode build...
Xcode build done. 4.4s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **


Xcode's output:

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'TOCropViewController' from project 'Pods')
error: No profiles for 'com.shavemachine.shaveMachineApp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.shavemachine.shaveMachineApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Reachability' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/alt/Mobile/Projects/shave-machine-app/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Toast' from project 'Pods')

Encountered error while building for device.

.这是医生:

✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-US)
• Flutter version 2.2.3 at /Users/alt/fvm/versions/stable
• Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/alt/Mobile/Sdk/Andriod/
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/alt/Mobile/Sdk/Andriod
• Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5.1, Build version 12E507
• CocoaPods version 1.11.0.rc.1

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

[!] Android Studio (version 2020.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
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.

[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0

[✓] Connected device (2 available)
• iPod touch (7th generation) (mobile) • 9318977C-48B1-4E5E-A483-460F582C9794 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159

! Doctor found issues in 1 category.

最佳答案

第一步:

enter image description here

第二步:

flutter clean

然后,

pod install

之后

flutter build ios

希望这能解决您的问题,祝您愉快:)

关于ios - flutter app 不是由 flutter build ios 运行,而是由 xcode 运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68952222/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com