xcode 警告:签名和功能的功能可能无法正常运行,因为其权限使用占位符团队ID vscode

gorkyyrv  于 2023-08-07  发布在  Vscode
关注(0)|答案(1)|浏览(114)

我想在iOS上测试我的Flutter应用程序。我没有Mac,所以我在Virtual Box上安装了 Catalina ,并在VS Code上运行我的项目,但当我运行flutter run时,我得到了下面的错误

warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor.

字符串
我不知道是什么导致了这个错误。Google解决错误的方法我得到了下面的解决方案,这是为Xcode。由于某些原因,我无法在Xcode中打开我的项目。如何使用VS Code https://stackoverflow.com/a/56616260/7290043实现相同的功能

完全错误

Launching lib/main.dart on iPhone 11 Pro in debug mode...
/Users/danish/Documents/storeifie/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 35 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
/Users/danish/Documents/storeifie/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 35 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Running Xcode build...                                                  
Xcode build done.                                           79.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    In file included from /Users/danish/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.m:5:
    /Users/danish/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner'
    from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.

mrphzbgm

mrphzbgm1#

'Flutter/Flutter.h' file not found通常发生在应用程序在Android中启动并运行,而您尝试在iOS上运行它时。一些开发人员在升级Flutter版本时也可能会遇到它。在更新的iOS模拟器上运行项目时发生此致命错误。
您可以尝试一些解决方案来解决此问题。

方案一:

有一种可能性是你的PodFile没有选择配置,你需要改变它,请参阅下面的例子:
PodFile中更改以下代码可以解决此问题
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' end end end

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end

方案二:

有些人在将通道从master/dev更改为beta/stable时可能会遇到此错误。
如果是这种情况,您可能需要考虑以下解决方案:
1.使用命令rm ios/Flutter/Flutter.podspec删除ios/Flutter/Flutter.podspec
1.删除Flutter.podspec后,您的Flutter将被清理。
1.运行应用程序。

方案三:

如果上述解决方案不起作用,请尝试以下操作:

  1. cd ios进入flutter项目的iOS目录。
    1.现在通过pod decintegrate分解pod
  2. rm Flutter/Flutter.podspec
  3. rm podfile.lock
  4. flutter clean
  5. flutter run

方案四:

如果您的问题仍未解决,请将应用的频道从master更改为stable。在终端运行以下命令以更改频道:

  1. flutter channel stable
  2. flutter clean
  3. flutter run

相关问题