[英]Provisioning profile "iOS Team Provisioning Profile: doesn't include the currently selected device" Flutter - MacOS
I'm able to build the macOS app from Xcode and run successfully, but when I'm trying to run it from Android Studio it's giving me the following error:我能够从 Xcode 构建 macOS 应用程序并成功运行,但是当我尝试从 Android Studio 运行它时,出现以下错误:
Provisioning profile "mac Team Provisioning Profile: doesn't include the currently selected device"
配置文件“mac 团队配置文件:不包括当前选择的设备”
If I go to my apple developer account I can see my device UUID there as well.如果我 go 到我的苹果开发者帐户,我也可以在那里看到我的设备 UUID。
If you're on Mac M1, your device will have two UUIDs: one when Xcode / xcodebuild is running natively, the other when running under Rosetta.如果您在 Mac M1 上,您的设备将有两个 UUID:一个在 Xcode / xcodebuild 本地运行时,另一个在 Rosetta 下运行时。
To register your device ID under Rosetta:在 Rosetta 下注册您的设备 ID:
Xcode will add the device ID to your profile. Xcode 会将设备 ID 添加到您的配置文件中。 You can now uncheck "Open using Rosetta" to have Xcode running natively again.
您现在可以取消选中“使用 Rosetta 打开”以使 Xcode 再次原生运行。
See also this github issue .另请参阅此 github 问题。
That has been solved by:已通过以下方式解决:
~/Library/MobileDevice/Provisioning/Profiles/
~/库/MobileDevice/配置/配置文件/
Flutter clean Flutter 清洁
Run again再次运行
EDIT编辑
You might need to open the project from Xcode and build it from there, and don't forget the pod install
command您可能需要从 Xcode 打开项目并从那里构建它,不要忘记
pod install
命令
You can try running the project via xcode first then running it via flutter SDK.您可以尝试先通过 xcode 运行项目,然后通过 flutter SDK 运行它。 This solved the mentioned issue for me.
这为我解决了上述问题。
Worked for me: Delete macos folder inside your flutter project, and then run this command:为我工作:删除 flutter 项目中的 macos 文件夹,然后运行以下命令:
flutter create .
it creates a new macos folder for you and you can run your project now它会为您创建一个新的 macOS 文件夹,您现在可以运行您的项目
Open your project from Xcode从 Xcode 打开你的项目
Select the device that experienced the issue from the devices list. Select 设备列表中出现问题的设备。 check this
检查这个
Product > Clean Build Folder产品 > 清理构建文件夹
Product > Build产品 > 构建
Then Xcode will then ask you to register the device to your developer account.然后 Xcode 会要求您将设备注册到您的开发者帐户。 Add it and run your project as normal from Flutter.
添加它并从 Flutter 正常运行您的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.