gpt4 book ai didi

ios - Flutter 调试构建不会加载 ios 设备上的 Assets

转载 作者:IT王子 更新时间:2023-10-29 06:46:24 25 4
gpt4 key购买 nike

当我在 iOS iPhone X 上运行 flutter gallery 时, Assets 丢失了。我正在使用主 channel 。

我能够让画廊在 iPhone 8 plus 上运行,然后再次运行后它做了同样的事情。加载 Assets 时不会加载。

我不确定是什么失败了。我猜构建缓存需要清理以便复制 Assets 。重置模拟器对我不起作用。

您知道如何修复 iOS 的调试版本吗?

它的样子: enter image description here

加载应用程序时发生的异常。

Unable to load asset: AssetManifest.json
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1 CachingAssetBundle._fetchString (package:flutter/src/services/asset_bundle.dart:160:33)
<asynchronous suspension>
#2 CachingAssetBundle.loadString (package:flutter/src/services/asset_bundle.dart:156:12)
#3 CachingAssetBundle.loadStructuredData (package:flutter/src/services/asset_bundle.dart:184:5)
#4 AssetImage.obtainKey (package:flutter/src/services/image_resolution.dart:167:18)
#5 ImageProvider.resolve (package:flutter/src/services/image_provider.dart:264:5)
#6 _ImageState._resolveImage (package:flutter/src/widgets/image.dart:468:33)
#7 _ImageState.didChangeDependencies (package:flutter/src/widgets/image.dart:449:5)
#8 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3688:12)
#9 ComponentElement.mount (package:flutter/src/widg<…>

这是医生的输出:

Brandons-MacBook-Pro:flutter_gallery branflake2267$ flutter doctor
[✓] Flutter (on Mac OS X 10.13 17A405, locale en-US, channel master)
• Flutter at /Users/branflake2267/git/flutter
• Framework revision acdbe45670 (14 hours ago), 2017-10-27 18:23:50 -0700
• Engine revision ec19da1c80
• Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
• Android SDK at /Users/branflake2267/Library/Android/sdk
• Platform android-26, build-tools 26.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version openjdk version "1.8.0_152-release"

[✓] iOS toolchain - develop for iOS devices (Xcode 9.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.0.1, Build version 9A1004
• ios-deploy 1.9.2
• CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio 3.0.app/Contents
• Java version openjdk version "1.8.0_152-release"

[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version openjdk version "1.8.0_152-release"

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.5)
• Flutter plugin version 18.1
• Dart plugin version 172.4155.35

[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
• Flutter plugin version 17.0
• Dart plugin version 172.4155.35

[✓] Connected devices
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)
• iPhone X • 4CDF751B-C49B-46A4-A120-231AAF47C958 • ios • iOS 11.0 (simulator)

最佳答案

昨晚升级我的 master 分支后,我也遇到了同样的问题。我的临时修复:从 master 恢复到 alpha 分支。

我还在此处提交了一个 github 问题:https://github.com/flutter/flutter/issues/12776

关于ios - Flutter 调试构建不会加载 ios 设备上的 Assets ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46991641/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com