无法使用“Pods-Runner/Pods-Runner-frameworks.sh: Permission denied”错误构建 Flutter

Posted

技术标签:

【中文标题】无法使用“Pods-Runner/Pods-Runner-frameworks.sh: Permission denied”错误构建 Flutter【英文标题】:Failed to build Flutter with `Pods-Runner/Pods-Runner-frameworks.sh: Permission denied` error 【发布时间】:2021-02-24 00:34:54 【问题描述】:

我正在训练使用 codemagic 或 Macbook 为 ios 构建一个 Flutter APP,但我有一个问题。我使用这个逗号来创建一个构建。 看来我们并没有对颤振/引擎进行干净的构建。旧的头文件 我想为 iOS 创建一个建筑物。 我用这个逗号

 flutter build ios 

然后返回这个。

== Building for iOS ==


> /usr/local/bin/flutter build ios --debug --no-codesign

Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.

Building com.coachingconcurseiros.app for device (ios)...
Upgrading project.pbxproj

Project base configurations detected, removing.

Running pod install...                                          
    6.4s
Warning: Podfile is out of date
  This can cause issues if your application depends on plugins that do not support iOS.
  See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

Running Xcode build...                                          

Xcode build done.                                           137.1s

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterChannels.h' [-Wincomplete-umbrella]
    #import "Headers/Flutter.h"
    ^
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterCodecs.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPlatformViews.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterMacros.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterHeadlessDartRunner.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterAppDelegate.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterBinaryMessenger.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterViewController.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterEngine.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterCallbackCache.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPlugin.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPluginAppLifeCycleDelegate.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._Flutter.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterDartProject.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterTexture.h' [-Wincomplete-umbrella]
    15 warnings generated.
    15 warnings generated.
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterChannels.h' [-Wincomplete-umbrella]
    #import "Headers/Flutter.h"
    ^
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterCodecs.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPlatformViews.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterMacros.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterHeadlessDartRunner.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterAppDelegate.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterBinaryMessenger.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterViewController.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterEngine.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterCallbackCache.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPlugin.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterPluginAppLifeCycleDelegate.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._Flutter.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterDartProject.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header '._FlutterTexture.h' [-Wincomplete-umbrella]
    15 warnings generated.
    15 warnings generated.
    /Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_statusbarcolor-0.2.3/ios/Classes/FlutterStatusbarcolorPlugin.m:15:37: warning: implicit conversion from 'long long' to 'NSInteger' (aka 'int') changes value from 38482458385 to -172247279 [-Wconstant-conversion]
    static NSInteger statusBarViewTag = 38482458385;
                     ~~~~~~~~~~~~~~~~   ^~~~~~~~~~~
    1 warning generated.
    2020-11-11 16:47:42.499 ibtoold[2946:57064] DEBUG: Added to environment: 
        TMPDIR = "/var/folders/pj/2d8_b7sn6f37c48z4jj09xk80000gn/T/DAC2F8A2-259D-436E-B8E9-0EAA75711902";
    
    /* com.apple.actool.document.warnings */
    /Users/builder/clone/ios/Runner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50@1x.png]: warning: The app icon set "AppIcon" has 6 unassigned children.
    /Users/builder/clone/ios/Runner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50@1x.png]: warning: The app icon set "AppIcon" has 6 unassigned children.
    /* com.apple.actool.document.notices */
    /Users/builder/clone/ios/Runner/Assets.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][]: notice: 76x76@1x app icons only apply to iPad apps targeting releases of iOS prior to 10.0.
    /* com.apple.actool.compilation-results */
    /Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/assetcatalog_generated_info.plist
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@2x~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20@3x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon20x20~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@2x~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29@3x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon29x29~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@2x~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40@3x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon40x40~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@2x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon60x60@3x.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon76x76@2x~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon76x76~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/AppIcon83.5x83.5@2x~ipad.png
    /Users/builder/clone/build/ios/Debug-iphoneos/Runner.app/Assets.car

    /Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-46700B3D58DF788A9BC098CC.sh: line 2: /Users/builder/clone/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh: Permission denied
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constru

cting build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Reachability' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'sqflite' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'share' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'image_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'flutter_statusbarcolor' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'flutter_plugin_android_lifecycle' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'connectivity' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'connectivity_macos' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences_windows' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences_web' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Flutter' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences_macos' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'connectivity_for_web' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences_linux' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider_windows' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider_linux' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider_macos' from project 'Pods')

Encountered error while building for device.

Build failed :|
Failed to build for iOS

这是我尝试构建时的回报

【问题讨论】:

【参考方案1】:

尝试在 Podfile 所在的主项目目录中运行 pod install

要使用 Codemagic 构建它,您需要添加 pre-build 脚本

【讨论】:

谢谢。但它不起作用。这有同样的错误

以上是关于无法使用“Pods-Runner/Pods-Runner-frameworks.sh: Permission denied”错误构建 Flutter的主要内容,如果未能解决你的问题,请参考以下文章

无法使用 StorageClass 配置卷 - 无法获取存储帐户的存储密钥

Worklight Studio 和本地开发,有时无法使用 Java 类,有时无法使用 HTML 文件

ADB无法使用解决办法

Ubuntu 80端口无法使用-非root用户无法使用1024以下端口

无法在 SQL Server 视图中使用工作查询:“IS”无法识别“>”无法识别

LINUX下的mail\mailx为啥无法使用外部SMTP发邮件