1.報(bào)錯(cuò)內(nèi)容:
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項(xiàng)目下的~/.ios 的項(xiàng)目 Runner.wcworkspace,修改項(xiàng)目的證書,證書可用的,就可以運(yùn)行起來敏晤。
2.報(bào)錯(cuò):Mapping values are not allowed here. Did you miss a colon earlier?
解決方案:此處表示第32行的對齊格式有問題启上,請按規(guī)定方式對其就解決了
3.報(bào)錯(cuò):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.
執(zhí)行runner報(bào)錯(cuò):
解決方案1.關(guān)閉Xcode意敛,重新執(zhí)行pod install吗货,之后再重新打開Xcode運(yùn)行
方案2:刪除以下文件:
xcworkspace
Podfile.lock
Pods文件夾
~/Library/Developer/Xcode/DerivedData路徑下對應(yīng)工程的文件夾
然后重新執(zhí)行pod install
方案3:有可能改完之后沒有生效,所以flutter 需要clean一下京郑。在編譯器執(zhí)行 flutter clean ,再重新運(yùn)行
方案N:1.https://stackoverflow.com/questions/32696463/diff-podfile-lock-no-such-file-or-directory