颤振-iOS模拟器未加载资源

颤振-iOS模拟器未加载资源,ios,flutter,Ios,Flutter,使用iOS模拟器时无法加载映像资产。此错误总是发生在运行flatter run命令时,但在我使用热重启(shift+r)重新运行之后,所有映像资源都成功加载。如果我停止程序并再次使用flatterrun命令重新运行,它仍然显示相同的错误。只有在iOS中运行时才会发生这种情况 目前我使用的是稳定频道 Flutter 1.7.8+hotfix.3 • channel stable • https://github.com/flutter/flutter.git Framework • revisio

使用iOS模拟器时无法加载映像资产。此错误总是发生在运行flatter run命令时,但在我使用热重启(shift+r)重新运行之后,所有映像资源都成功加载。如果我停止程序并再次使用flatterrun命令重新运行,它仍然显示相同的错误。只有在iOS中运行时才会发生这种情况

目前我使用的是稳定频道

Flutter 1.7.8+hotfix.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b712a172f9 (9 days ago) • 2019-07-09 13:14:38 -0700
Engine • revision 54ad777fd2
Tools • Dart 2.4.0
我已经尝试使用主通道仍然不工作,再次返回到稳定通道仍然不工作。在运行flatterrun命令之前,我也运行了flatterclean,但它并没有改变任何事情

这是我的pubspec。yaml看起来像

flutter:
  uses-material-design: true
  assets:
    - assets/images/
这是我在控制台中得到的

flutter: ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
flutter: The following assertion was thrown resolving an image codec:
flutter: Unable to load asset: assets/images/logo_idbalap.png
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      PlatformAssetBundle.load 
package:flutter/…/services/asset_bundle.dart:221
flutter: <asynchronous suspension>
flutter: #1      AssetBundleImageProvider._loadAsync 
package:flutter/…/painting/image_provider.dart:464
flutter: <asynchronous suspension>
flutter: #2      AssetBundleImageProvider.load 
package:flutter/…/painting/image_provider.dart:449
flutter: #3      ImageProvider.resolve.<anonymous closure>.<anonymous closure>.<anonymous closure> 
package:flutter/…/painting/image_provider.dart:316
flutter: #4      ImageCache.putIfAbsent 
package:flutter/…/painting/image_cache.dart:160
flutter: #5      ImageProvider.resolve.<anonymous closure>.<anonymous closure> 
package:flutter/…/painting/image_provider.dart:316
flutter: (elided 13 frames from package dart:async)
flutter:
flutter: Image provider: AssetImage(bundle: null, name: "assets/images/logo_idbalap.png")
flutter: Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#90c63(), name:
flutter:   "assets/images/logo_idbalap.png", scale: 1.0)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
最后,我尝试卸载应用程序并再次运行
flatterclean
flatterrun
。我犯了这个错误

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
    Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
  Command: /usr/bin/xcrun simctl install 0271F90D-7FA8-4728-908A-25E08B56AC50 /Users/fakhrinf/Development/Mobile/idbalapflutter/build/ios/iphonesimulator/Runner.app


#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:259:7)
<asynchronous suspension>
#1      SimControl.install (package:flutter_tools/src/ios/simulators.dart:128:16)
#2      IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:415:31)
<asynchronous suspension>
#3      IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:315:15)
<asynchronous suspension>
#4      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:371:54)
#5      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#6      _rootRunUnary (dart:async/zone.dart:1132:38)
#7      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#8      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#9      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#10     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#11     Future._complete (dart:async/future_impl.dart:473:7)
#12     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#13     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#14     _rootRun (dart:async/zone.dart:1120:38)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#18     _rootRun (dart:async/zone.dart:1124:13)
#19     _CustomZone.run (dart:async/zone.dart:1021:19)
#20     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#21     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#22     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#23     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#24     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
颤振碰撞报告;请在https://github.com/flutter/flutter/issues.
##命令
飞跑
##例外情况
ProcessException:ProcessException:Process“/usr/bin/xcrun”异常退出:
处理命令时遇到错误(域=IXUserPresentableErrorDomain,代码=1):
此时无法安装此应用程序。
未能从路径/Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app处的捆绑包中加载Info.plist
未能从路径/Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app处的捆绑包中加载Info.plist
基本错误(域=MIInstallerErrorDomain,代码=35):
未能从路径/Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app处的捆绑包中加载Info.plist
命令:/usr/bin/xcrun simctl install 0271F90D-7FA8-4728-908A-25E08B56AC50/Users/fakhrinf/Development/Mobile/idbalapflutter/build/ios/iphonesimulator/Runner.app
#0 runCheckedAsync(包:颤振工具/src/base/process.dart:259:7)
#1 SimControl.install(包:flatter_tools/src/ios/simulators.dart:128:16)
#2 IOSSimulator._setupUpdatedApplicationBundle(包:flatter_tools/src/ios/simulators.dart:415:31)
#3 IOSSimulator.startApp(包:颤振工具/src/ios/simulators.dart:315:15)
#4颤振装置。运行热(包装:颤振工具/src/resident_转轮。dart:371:54)
#5_asyncWrapperHelper。(dart:async patch/async_patch.dart:77:64)
#6_rootrunary(dart:async/zone.dart:1132:38)
#7_CustomZone.runUnary(dart:async/zone.dart:1029:19)
#8\u FutureListener.handleValue(dart:async/future\u impl.dart:126:18)
#9 Future.\u PropagateTListeners.handleValueCallback(dart:async/Future\u impl.dart:639:45)
#10未来传播到侦听器(dart:async/Future\u impl.dart:668:32)
#11未来完成(dart:async/Future\u impl.dart:473:7)
#12\u SyncCompleter.complete(dart:async/future\u impl.dart:51:12)
#13_asyncwaitcompleter.complete。(dart:async patch/async_patch.dart:33:20)
#14_rootRun(dart:async/zone.dart:1120:38)
#15_CustomZone.run(dart:async/zone.dart:1021:19)
#16 _CustomZone.runguard(dart:async/zone.dart:923:7)
#17_CustomZone.bindcallbackguard。(省道:异步/分区。省道:963:23)
#18_rootRun(dart:async/zone.dart:1124:13)
#19_CustomZone.run(dart:async/zone.dart:1021:19)
#20_CustomZone.runguard(dart:async/zone.dart:923:7)
#21_CustomZone.bindcallbackguard。(省道:异步/分区。省道:963:23)
#22微任务循环(dart:async/schedule\u microtask.dart:41:21)
#23_startMicrotaskLoop(dart:async/schedule_microtask.dart:50:5)
#24 _运行挂起立即返回(dart:隔离补丁/隔离补丁。dart:116:13)
#25 RawReceivePortImpl.handleMessage(dart:隔离补丁/隔离补丁。dart:173:5)

在尝试了很多方法来解决负载资源问题,多次弄脏了我的颤振项目之后,我决定用新的颤振项目在创建时使用
--androidx
标志对其进行测试。我不确定这是否会影响iOS中的任何内容,但在我将旧项目迁移到androidx并发布到playstore后,我的项目在iOS中会出错


创建新项目后,我复制了我的旧
pubspec.yaml
资产文件夹lib文件夹,并且工作正常

在第一次运行
flatter run
之前,尝试从模拟器中删除应用程序。我尝试了一下,但又遇到了一个令人震惊的崩溃错误<代码>面向对象;弗利特出人意料地退出了。正在向谷歌发送崩溃报告。我尝试再次运行它,但崩溃错误消失了,但我的图像资源仍然没有显示,上面的错误与此相同。
Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
    Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
  Command: /usr/bin/xcrun simctl install 0271F90D-7FA8-4728-908A-25E08B56AC50 /Users/fakhrinf/Development/Mobile/idbalapflutter/build/ios/iphonesimulator/Runner.app


#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:259:7)
<asynchronous suspension>
#1      SimControl.install (package:flutter_tools/src/ios/simulators.dart:128:16)
#2      IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:415:31)
<asynchronous suspension>
#3      IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:315:15)
<asynchronous suspension>
#4      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:371:54)
#5      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#6      _rootRunUnary (dart:async/zone.dart:1132:38)
#7      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#8      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#9      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#10     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#11     Future._complete (dart:async/future_impl.dart:473:7)
#12     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#13     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#14     _rootRun (dart:async/zone.dart:1120:38)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#18     _rootRun (dart:async/zone.dart:1124:13)
#19     _CustomZone.run (dart:async/zone.dart:1021:19)
#20     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#21     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#22     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#23     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#24     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)