正如标题所示,我根本无法在 Android Studio 上运行我的 flutter 应用程序(使用 IOS 模拟器)。不知何故,如果我运行并修复 Xcode 本身中的所有 Xcode 错误,我就能够运行它。\n但是,当我稍后尝试在 android studio 中运行它时,会出现许多来自 IOS 构建的错误。没有具体的错误日志,因为警告总是不同的。\n以下是我怀疑的一些原因:
\n我尝试过很多事情,包括:
\nPod deintegrate** & pod install\nCleaning and running\nRestarting the computer\nLegacy build system\nRun Code Online (Sandbox Code Playgroud)\n\n我尝试过的事情太多了,我只记得其中的一半。这是我尝试从 Android Studio 构建时的最新错误日志:
\n编辑-------- \n这是我最近的错误日志:
\nXcode\'s output:\n\xe2\x86\xb3\n ld: building for iOS Simulator, but linking in dylib built for iOS, file \'/Users/tomasward/Desktop/Fredi/ios/Pods/TwitterKit/iOS/TwitterKit.framework/TwitterKit\' for architecture arm64\n clang: error: …Run Code Online (Sandbox Code Playgroud) 我正在制作一个聊天应用程序,其中:
\n我用来firebase-realtime-database存储数据。
为每个用户随机生成密钥
\nString generateEncryptionKey(int len) {\n var r = Random();\n String randomString = String.fromCharCodes(List.generate(len,\n (index) => r.nextInt(33) + 89));\n return randomString;\n}\nRun Code Online (Sandbox Code Playgroud)\n这可能是错误的。derived key如果我需要从用户的密码中获取密码或者这是否足够,我需要澄清。
shared-secret key)shared-secret keyshared-secret key每个个人密钥都有一些共同点,对吧?因此,任何参与者加密的消息都可以被任何其他参与者解密。
我怎样才能生成shared-secret key?
generateKeyPair() {\n // Generate a private - …Run Code Online (Sandbox Code Playgroud) IOS 模拟器中的软件键盘未出现,并在使用 Android Studio 和 Flutter 的控制台中显示错误:
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/services/hardware_keyboard.dart': Failed assertion: line 790 pos 16: '(data.physical == 0 && data.logical == 0) ||
(data.physical != 0 && data.logical != 0)': is not true.
Run Code Online (Sandbox Code Playgroud) 当运行我的 iOS 版 Flutter 应用程序时,出现以下错误:
\nXcode build done. 86.8s\nFailed to build iOS app\nCould not build the precompiled application for the device.\nSwift Compiler Error (Xcode): No such module \'shared_preferences_ios\'\n/Users/tomasward/Desktop/fredi_new/ios/Runner/AppDelegate.swift:3:7\nRun Code Online (Sandbox Code Playgroud)\n这是从这段代码派生出来的AppDelegate.swift:
import UIKit\nimport Flutter\nimport awesome_notifications\nimport shared_preferences_ios //error here\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n override func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n ) -> Bool {\n GeneratedPluginRegistrant.register(with: self)\n \n if …Run Code Online (Sandbox Code Playgroud)