Mac with Mojave
Flutter installed
Flutter Doctor passed all the tests
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.3)
[✓] Connected device (2 available)
我启动了 IntelliJ IDE,然后单击创建新项目
我选择了 Android 模拟器:Nexus 5S,模拟器可以正常打开。
我点击了绿色箭头运行,但是我得到了以下错误信息:
════════════════════════════════════════════════════════════════════════════════
No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID
in Xcode and create an iOS Development Certificate as well as a Provisioning
Profile for your project 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
5- Trust your newly created Development Certificate on your iOS device
via Settings > General > Device Management > [your new certificate] > Trust
For more information, please visit:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Finished with error: No development certificates available to code sign app for device deployment
有什么想法吗?
最佳答案
看起来它正试图在没有有效证书的 ios 设备上运行。 Flutter 医生说连接了 2 个设备。如果你有一个 ios 设备连接到你的计算机,请尝试断开它,这样 flutter 就不会尝试使用它而不是模拟器。
关于flutter - 无法在 flutter 下运行第一个项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54411939/