簡體   English   中英

Flutter IOS 應用程序在運行時卡在啟動屏幕

[英]Flutter IOS app stuck at Launch Screen while run

幾個星期以來,我一直在與一個問題作斗爭,它變得令人沮喪。 我的 flutter android apk 在 android 上構建並運行良好,但我也嘗試在 iOS 模擬器上運行,但它一直停留在啟動屏幕上並且沒有進一步運行 go。

我嘗試過的事情。

1) 在 Xcode 的構建階段下將這些文件添加到腳本中。

"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed
"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" thin

2) 將FirebaseApp.configure()添加到我的AppDelegate文件中。

3)重裝flutter

4)切換到各種flutter頻道

這是來自 Xcode 的錯誤:

2020-04-24 15:02:34.421613+0100 Kashbase[23884:5243353] Failed to find assets path for "Frameworks/App.framework/flutter_assets"
2020-04-24 15:02:34.774843+0100 Kashbase[23884:5243704] flutter: Observatory listening on http://127.0.0.1:62748/_bDwywAMqhg=/
2020-04-24 15:02:34.943017+0100 Kashbase[23884:5243695] [VERBOSE-2:engine.cc(127)] Engine run configuration was invalid.
2020-04-24 15:02:34.943706+0100 Kashbase[23884:5243695] [VERBOSE-2:shell.cc(437)] Could not launch engine with configuration.
2020-04-24 15:02:35.027558+0100 Kashbase[23884:5243628] 6.18.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2020-04-24 15:02:35.083060+0100 Kashbase[23884:5243625] 6.18.0 - [Firebase/Analytics][I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-04-24 15:02:35.084616+0100 Kashbase[23884:5243625] 6.18.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60300000 started
2020-04-24 15:02:35.085987+0100 Kashbase[23884:5243625] 6.18.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 
2020-04-24 15:02:35.884479+0100 Kashbase[23884:5243728] 6.18.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-04-24 15:02:36.240827+0100 Kashbase[23884:5243628] 6.18.0 - [Firebase/Analytics][I-ACS800003] Registered an SDK that has already registered. Default flags will be overwritten. SDK name: app_measurement
2020-04-24 15:02:36.274854+0100 Kashbase[23884:5243628] 6.18.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-04-24 15:02:36.686320+0100 Kashbase[23884:5243628] 6.18.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled

在這種情況下我的建議是:

  1. 切換到所需的 Flutter 頻道(例如 beta)
  2. 使用flutter clean項目
  3. 刪除ios目錄(刪除前確保有備份或git歷史記錄)
  4. 重新創建 ios 項目: flutter create. 在項目目錄中運行。 這應該創建新的 iOS 項目
  5. 致電flutter pub get

您還可以嘗試通過以下方式更新 iOS pod:

  1. 通過在 ios 目錄中運行來更新 pod 存儲庫: pod repo update
  2. 通過以下方式重新安裝 pod: pod install

暫無
暫無

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

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