整理此问题,因为有许多不同的信息并正在取得进展。最初,问题是:
// ...
"python.envFile": "${workspaceFolder}/.env",
// ...
同时使用XCode:
flutter run -v
"/Users/sjr/Library/Developer/Xcode/iOS DeviceSupport/13.3.1
(17D50)/Symbols/Developer"
[ +35 ms] (lldb) command script import
"/tmp/1D186BA70/fruitstrap_4c604fe43a334525340e269626a.py"
[ +4 ms] (lldb) command script add -f
fruitstrap_4c604fe43a334525340e269626a.connect_command connect
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_4c604fe43a334525340e269626a.run_command run
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_4c604fe43a334525340e269626a.autoexit_command autoexit
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_4c604fe43a334525340e269626a.safequit_command safequit
[ ] (lldb) connect
[ +52 ms] (lldb) run
[ +277 ms] success
[ ] (lldb) safequit
[ +120 ms] Process 434 detached
[ +48 ms] Application launched on the device. Waiting for observatory port.
[ +4 ms] Checking for advertised Dart observatories...
[+5026 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
和
io.flutter.204.ui (625): signal SIGABRT
数百次直到:
Failed to find snapshot: /private/var/containers/Bundle/Application/E00E6D3690/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
从那时起,我遵循了很多建议,并尝试了不同的尝试和建议来使此工作正常进行,但是到目前为止,没有任何改变。
更新:
昨晚,我在flutter论坛中发现一个线程,提示这都是iOS 13.3引起的,而13.4.1解决了这些问题。将此安装在我的设备上,但对这个问题没有任何影响。
然后我研究了错误中的路径:
../../third_party/dart/runtime/vm/clustered_snapshot.cc: 68: error: Out of memory.
并发现在我的private / var文件夹中,我根本没有名为容器的文件夹,因此,当然找不到它。我不确定该文件夹应该在什么时候填充文件和数据,但这也许是整个混乱的关键。
有人知道导致这些文件夹填充的原因吗,为什么我的文件夹可能根本不存在?
答案 0 :(得分:0)
这是一个相对“已知”的问题,我也有同样的问题。我真的很累。该错误可能由于某些原因而消失,然后再次出现。您可以查看以下线程:
https://github.com/FirebaseExtended/flutterfire/issues/326
https://github.com/flutter/flutter/issues/50532
https://github.com/flutter/flutter/issues/47627
我收集了大概有用的提示,但对我没有帮助,但是您可以尝试:
flutter clean
rm -rf .flutter-plugins
rm -rf .packages
rm -rf build/
rm -rf ios/Pods
rm ios/Podfile*
rm -rf "${HOME}/.pub-cache/"
rm pubspec.lock
rm -rf ios/Runner.xcodeproj/project.xcworkspace
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "~/Library/Developer/Xcode/DerivedData"
flutter packages get
以上路径在您的计算机上可能不同。
UPD :此外,在运行“ flutter run”之前,请尝试“ flutter构建ios”
答案 1 :(得分:0)
超级烦人,是的!
对我有帮助的是:
rm -rf ~/Library/Developer/Xcode/DerivedData/rm -rf ~/Library/Caches/CocoaPods/
rm -rf ios/Pods/
pod cache clean --all
# clear flutter - skip the next 3 lines if you're not using flutter
flutter clean
flutter pub get
cd ios
# run pod install
rm Podfile.lock
pod install --repo-update
AppDelegate.swift
的顺序正确。import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure() // <- This line first
GeneratedPluginRegistrant.register(with: self) // <- This line second
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
(来源:https://github.com/FirebaseExtended/flutterfire/issues/3447#issuecomment-691654019)