简体   繁体   English

配置文件“iOS 团队配置文件:不包括当前选择的设备”Flutter - MacOS

[英]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:

  1. Applications folder > Xcode > right-click > Get Info > check "Open using Rosetta"应用程序文件夹 > Xcode > 右键单击 > 获取信息 > 选中“使用 Rosetta 打开”
  2. Open app in Xcode在 Xcode 中打开应用程序
  3. Runner > Runner > Signing & Capabilities > ensure "Automatically manage signing" is checked Runner > Runner > Signing & Capabilities > 确保选中“自动管理签名”
  4. Xcode will give you an error about the device ID not being in the provisioning profile > click the fix button Xcode 会给您一个关于设备 ID 不在配置文件中的错误 > 单击修复按钮
  5. Repeat steps 3. & 4. for any extensions you might have对您可能拥有的任何扩展重复步骤 3. 和 4.

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:已通过以下方式解决:

  1. Deleting the provisioning profiles from the following path:从以下路径中删除配置文件:

~/Library/MobileDevice/Provisioning/Profiles/ ~/库/MobileDevice/配置/配置文件/

  1. Flutter clean Flutter 清洁

  2. 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 文件夹,您现在可以运行您的项目

  1. Open your project from Xcode从 Xcode 打开你的项目

  2. Select the device that experienced the issue from the devices list. Select 设备列表中出现问题的设备。 check this检查这个

  3. Product > Clean Build Folder产品 > 清理构建文件夹

  4. Product > Build产品 > 构建

  5. 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.

相关问题 xcodebuild:检查依赖项配置文件“ iOS Team Provisioning Profile不包括当前选择的设备“ iPhone” - xcodebuild: Check dependencies Provisioning profile “iOS Team Provisioning Profile doesn't include the currently selected device ”iPhone" 配置文件“iOS Team Provisioning Profile: com.*****.******”不包括当前选择的设备“****'s MacBook Pro” - Provisioning profile "iOS Team Provisioning Profile: com.*****.******" doesn't include the currently selected device "****’s MacBook Pro" 配置文件不包括当前选择的设备错误 - Provisioning profile doesn't include the currently selected device error 配置文件“iOS 团队配置文件:...不支持关联域功能 - Provisioning profile "iOS Team Provisioning Profile: ... doesn't support the Associated Domains capability 恢复iOS团队配置文件 - Restore iOS Team Provisioning Profile iOS团队配置文件问题 - Issue with iOS team provisioning profile 消息 配置文件“iOS 团队配置文件:*”将在 15 天后过期 - Message The provisioning profile "iOS Team Provisioning Profile: *" will expire in 15 days IOS:在配置文件中添加设备 - IOS: add a device in provisioning profile iOS开发-没有设备的配置文件 - iOS Development - Provisioning Profile with no device RubyMotion Build:错误!找不到名为`(?-mix:iOS Team Provisioning Profile)的配置文件 - RubyMotion Build: ERROR! Can't find a provisioning profile named `(?-mix:iOS Team Provisioning Profile)'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM