当前位置: 首页 > 知识库问答 >
问题:

Flutter应用程序更新Flutter后未启动

岳承悦
2023-03-14

请帮帮我!该应用程序接近完成,因为我确实运行了flutter upgrade来解决一个bug,所以我必须运行:flutter clean flutter channel master flutter upgrade flutter run

现在它不再启动了,下面的代码出现了…

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           42,0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    In file included from /Users/patrickmeyer/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.m:5:
    /Users/patrickmeyer/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'share' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'GoogleDataTransport' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'shared_preferences' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'Firebase' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'GoogleUtilities' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'GoogleAppMeasurement' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'firebase_core' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'FirebaseCore' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'firebase_admob' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'nanopb' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'Flutter' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

[]Flutter(通道稳定,1.22.5,在Mac OS X 10.15.7 19H114 darwin-x64,现场显示)•Flutter版本1.22.5在/users/PatrickMeyer/Developer/Flutter•框架修订版7891006299(13天前)2020-12-10 11:54:40-0800•引擎修订版ae90085a84•Dart版本2.10.4

[]Android toolchain-为Android设备开发(Android SDK版本29.0.3)•Android SDK,地址为/Users/PatrickMeyer/Library/Android/SDK•平台android-29,build-tools 29.0.3•Java二进制地址为:/Applications/Android Studio.app/Contents/JRE/JDK/Contents/Home/Bin/Java•Java版本OpenJDK运行时环境(build 1.8.0_242-Release-1644-B3-6915495)•接受所有Android许可。

[]Xcode-为iOS和macOS开发(Xcode 12.3)•Xcode at/applications/Xcode.app/contents/developer•Xcode 12.3,Build version 12C33•CocoaPods version 1.10.0

[]Android Studio(4.1版)•Android Studio at/Applications/Android Studio.app/Contents•已安装Flutter插件•Dart插件201.9306版•Java版本OpenJDK运行时环境(构建1.8.0_242-Release-1644-b3-6915495)

[]已连接设备(1个可用)•iPhone 12 Pro Max(移动)•11ACA273-A0C3-405D-993A-A9AF9057887C•ios•com.apple.coreSimulator.Simruntime.ios-14-3(模拟器)

•未发现任何问题!

共有1个答案

马德宇
2023-03-14

在pod文件中运行pod UPDATE

 类似资料:
  • 2-如果我有未发布的应用程序,我想添加链接,如费率我的应用程序和链接相关的我的应用程序在play store(它尚未发布),我如何获得这些链接,以便我可以把他们在我的应用程序在发布之前在play store

  • 我已经尝试过几次升级flutter,但似乎也没有任何问题: 我最近换了笔记本电脑,并在这个新的笔记本上查看了我的代码的git存储库。有一些问题,但我最终解决了这些问题。唯一的区别是项目名称现在只是,而包名称是-但我认为这不会造成任何问题。 我的猜测是,问题出在我的中的某个地方:

  • 问题内容: 当我使用命令创建应用程序时,flutter徽标用作两个平台的应用程序图标。 如果我想更改应用程序图标,是否应同时进入两个平台目录并在其中替换图像?,分别用我指的是iOS和Android的平台目录来表示 。 还是可以将图像定义为Flutter Asset并且以某种方式生成图标? 问题答案: Flutter启动器图标旨在帮助快速生成适用于Android和iOS的启动器图标:https :

  • 当我使用命令创建应用程序时,flutter徽标用作两个平台的应用程序图标。 如果我想更改应用程序图标,我是否应该同时转到两个平台目录并替换那里的图像呢?对于平台目录,我指的是iOS的和Android的。 或者有可能将一个图像定义为Flutter资产,图标以某种方式生成?。

  • 几天前,我在play store上发布了Flatter android应用程序,现在我想在play store中更新该应用程序,因此对代码进行了更改,但现在我很困惑,我是否必须使用与第一次发布应用程序时相同的过程来生成新密钥(生成密钥,然后运行Flatter build应用程序包),还是必须遵循其他程序。请帮忙,万分感谢。

  • 在我的演示应用程序中,我需要从服务器加载一个2 JSON文件。这两个JSON都有大量数据。我使用Future+async+await调用json,而不是使用runapp创建小部件。在体内,我试图激活一个循环进程指示器。它显示appBar及其内容,以及空的白色页面主体,4或5秒后加载实际主体中的数据。 我的问题是,我需要首先显示CircularProgressIndicator,一旦加载数据,我将调