Flutter ios版本构建失败,退出代码为1 [英] Flutter ios release build failed with exit code 1

查看:267
本文介绍了Flutter ios版本构建失败,退出代码为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行flutter build ios

我在为iOS生成发布版本时遇到了麻烦,因为苹果团队拒绝了我的应用,原因如下:

I am having trouble with generating my release build for ios, I noticed after my app was rejected by the Apple team with the following:

TMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Flutter.framework/Flutter: _ptrace. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

我查找了有关这些API的信息,它似乎发送了一个调试版本而不是版本1,因此我在终端上运行了该版本的命令,我明白了:

I look it up about those APIs and it appears to have sent a debug build not the release one, so I run the command on the terminal for the release build and I got this:

Running Xcode build...                                                  

 ├─Building Dart code...                                    96,2s
 ├─Generating dSYM file...                                   0,4s
 ├─Stripping debug symbols...                                0,1s
 ├─Assembling Flutter resources...                           2,7s
 └─Compiling, linking and signing...                         6,5s
Xcode build done.                                           109,5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode的输出:

↳
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
    The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with "Use of deprecated Swift 3 @objc inference" logging enabled,
    and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
    The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with "Use of deprecated Swift 3 @objc inference" logging enabled,
    and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
    Building AOT snapshot in release mode (ios-release)...          
    Building App.framework for arm64...

    Building App.framework for armv7...
    Building AOT snapshot in release mode (ios-release)...             91,0s
    Built to build/aot/.
    warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
    warning: line table parameters mismatch. Cannot emit.
    note: while processing /Users/devel/FlutterProjects/ds_token/build/aot/armv7/snapshot_assembly.o
    Project /Users/devel/FlutterProjects/ds_token built and packaged successfully.
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
    Non-fat binary /Users/devel/FlutterProjects/ds_token/build/ios/Release-iphoneos/Runner.app/Frameworks/barcode_scan.framework/barcode_scan is not armv7. Running lipo -info:
    Non-fat file: /Users/devel/FlutterProjects/ds_token/build/ios/Release-iphoneos/Runner.app/Frameworks/barcode_scan.framework/barcode_scan is architecture: arm64
    Command /bin/sh failed with exit code 1

推荐答案

感谢您的答复,我通过卸载flutter的SDK并重新安装来解决了该问题.这就解决了问题. :)

Thank you for your replies, I solved it by uninstall flutter's SDK and reinstalling it again. And that solved the issue. :)

这篇关于Flutter ios版本构建失败,退出代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆