XianyuTech / flutter-boot

A native-flutter-hybrid develop tool helps you add and develop flutter with your existing app
621 stars 68 forks source link

flutter run - iOS - Command PhaseScriptExecution failed with a nonzero exit code #14

Closed JeasonL closed 4 years ago

JeasonL commented 4 years ago

MacOS 10.14.6(18G103) , XCode 10.3

Launching lib/main.dart on iPhone Xʀ in debug mode... Xcode build done. 23.5s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED Xcode's output: ↳ ld: warning: directory not found for option '-L/Users/ABC/Documents/Demo/demo_flutter/ios_shell/Flutter' ld: warning: directory not found for option '-F/Users/ABC/Documents/Demo/demo_flutter/ios_shell/Flutter' ld: warning: directory not found for option '-F/Users/ABC/Documents/Demo/demo_flutter/ios_shell/Flutter/engine' mkdir -p /Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/ABC/Documents/Demo/demo_flutter/ios_shell/Pods/../../.ios/Flutter/engine/Flutter.framework" "/Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks" building file list ... done Flutter.framework/ Flutter.framework/Flutter Flutter.framework/Info.plist Flutter.framework/icudtl.dat Flutter.framework/_CodeSignature/ Flutter.framework/_CodeSignature/CodeResources sent 94440042 bytes received 120 bytes 62960108.00 bytes/sec total size is 94428117 speedup is 1.00 Stripped /Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework/Flutter of architectures: armv7 arm64 Code Signing /Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework with Identity - /usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' /Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework: replacing existing signature /Users/ABC/Documents/Demo/demo_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework: Permission denied Command PhaseScriptExecution failed with a nonzero exit code note: Using new build systemnote: Planning buildnote: Constructing build description Could not build the application for the simulator. Error launching application on iPhone Xʀ. Exited (sigterm)

JeasonL commented 4 years ago

flutter版本问题,更新到master分支最新版本已修复了

Jenus commented 4 years ago

@JeasonL 你是用flutter-boot, or flutter-boost? 从日志上看, 仅仅是用了flutter的命令行, 跟boot这个框架貌似没有关系

JeasonL commented 4 years ago

@Jenus 用flutter-boot init 创建了项目,发现run不起来,flutter切换到master分支就好了 另外问一下, git clone用flutter-boot创建的项目到本地,需要重新link下iOS以及Android项目?

Jenus commented 4 years ago

用flutter-boot init 创建了项目,发现run不起来

flutter-boot init成功了吗? 如果init成功了, 猜测你没有link自己的iOS项目(仅仅是link了自己的android native项目, 或者忽略android) 正常是可以跑起来的. 当然你更新了flutter就好了, 那就更好了.

Jenus commented 4 years ago

git clone用flutter-boot创建的项目到本地,需要重新link下iOS以及Android项目?

这个问题, 是看boot里.gitIgnore文件做了什么(初步判定, 生成的环境都被忽略掉了, 所以从flutter开发视角是要再次link)? 当然, 一个验证的方法, 就是进入到flutter-module目录下面的, ios\目录下, 用命令行 ls -la 看一下, 如果有link, 就不用再flutter-boot link一次的