1.报错内容:
No Provisioning Profile was found for your project's Bundle Identifier or your
device. You can create a new Provisioning Profile for your project in Xcode for
your team by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- In the 'General' tab, make sure a 'Development Team' is selected.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
It's also possible that a previously installed app with the same Bundle
Identifier was signed with a different certificate.
For more information, please visit:
https://flutter.dev/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing
解决方案:打开flutter项目下的~/.ios 的项目 Runner.wcworkspace,修改项目的证书,证书可用的,就可以运行起来。
2.报错:Mapping values are not allowed here. Did you miss a colon earlier?
解决方案:此处表示第32行的对齐格式有问题,请按规定方式对其就解决了
3.报错:diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
执行runner报错:
解决方案1.关闭Xcode,重新执行pod install,之后再重新打开Xcode运行
方案2:删除以下文件:
xcworkspace
Podfile.lock
Pods文件夹
~/Library/Developer/Xcode/DerivedData路径下对应工程的文件夹
然后重新执行pod install
方案3:有可能改完之后没有生效,所以flutter 需要clean一下。在编译器执行 flutter clean ,再重新运行
方案N:1.https://stackoverflow.com/questions/32696463/diff-podfile-lock-no-such-file-or-directory
网友评论