簡體   English   中英

Flutter ios 發布構建失敗,退出代碼為 1

[英]Flutter ios release build failed with exit code 1

重現步驟

運行flutter build ios

我在為 ios 生成發布版本時遇到問題,在我的應用程序被 Apple 團隊拒絕后,我注意到以下內容:

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,它似乎發送了一個調試版本而不是發布版本,所以我在終端上運行了發布版本的命令,我得到了這個:

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的output:

↳
    === 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重新安裝解決了。 這解決了這個問題。 :)

在我的情況下,這不是我的 Flutter SDK 但是當我將我的 Mac 更新到 10.15(Catalina) 時,我的 Z8420719F133C543FDC191E7C5F74D47D 安裝沒有更新。 因此,每當我嘗試使用命令flutter build ios --realse並存檔它時。 Apple 向我發送了與您收到的相同的 email。

您可以使用以下命令安裝 cocoapods。

步驟 1 打開終端

第 2 步命令: sudo gem install cocoapods

第 3 步在終端上設置您的項目路徑。

第 4 步命令: pod init

我希望它有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM