无法从Flutter中的../url.png文件加载图像

时间:2020-09-25 22:28:24

标签: flutter flutter-layout flutter-dependencies

我是新手,所以这可能是一个愚蠢的问题,但是如果有人指示我该怎么做会有所帮助。现在我的问题是我遇到了错误

Supplier<S> sSupplier

我认为它的svg错误是为什么我在Xcode build done. 112.6s Failed to build iOS app Error output from Xcode build: ↳ 2020-09-26 04:11:00.741 xcodebuild[90742:789061] [MT] PluginLoading: Required plug-in compatibility UUID 6C8909A0-F208-4C21-9224-504F9A70056E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMColorSense.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2020-09-26 04:11:04.520 xcodebuild[90742:789061] [MT] iPhoneConnect: ?<DVTiOSDevice (0x7fd813277b00), Emon’s iPhone, iPhone, 13.7 (17H35), 9fe97cddff9918950e20b4f3a886f364f10869de> == Underlying device preparation errors == 2020-09-26 04:11:04.521 xcodebuild[90742:789061] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode. Domain: com.apple.platform.iphoneos Code: 5 Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fd812812350:'com.apple.platform.iphoneos':<DVTFilePath:0x7fd8128121a0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0 User Info: { DVTDeviceDescription = "\Ud83d\Udcf1<DVTiOSDevice (0x7fd813277b00), Emon\U2019s iPhone, iPhone, 13.7 (17H35), 9fe97cddff9918950e20b4f3a886f364f10869de>"; } -- 2020-09-26 04:11:04.521 xcodebuild[90742:789061] [MT] iPhoneConnect: ?<DVTiOSDevice (0x7fd813277b00), Emon’s iPhone, iPhone, 13.7 (17H35), 9fe97cddff9918950e20b4f3a886f364f10869de> == END: Underlying device preparation errors == 2020-09-26 04:11:18.281 xcodebuild[90742:789589] /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17219/XCSourceControl/Service/XCSourceControlXPCServiceClient.swift: 'com.apple.dt.GitHubHostBuiltInExtension' XPC connection interrupted: <NSXPCConnection: 0x7fd8131e30d0> connection to service on pid 0 named com.apple.dt.GitHubHostBuiltInExtension 2020-09-26 04:11:19.285 xcodebuild[90742:789589] /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17219/XCSourceControl/Service/XCSourceControlXPCServiceClient.swift: 'com.apple.dt.BitbucketHostBuiltInExtension' XPC connection interrupted: <NSXPCConnection: 0x7fd8137832f0> connection to service on pid 0 named com.apple.dt.BitbucketHostBuiltInExtension 2020-09-26 04:11:20.294 xcodebuild[90742:789589] /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17219/XCSourceControl/Service/XCSourceControlXPCServiceClient.swift: 'com.apple.dt.GitLabSelfHostBuiltInExtension' XPC connection interrupted: <NSXPCConnection: 0x7fd813545810> connection to service on pid 0 named com.apple.dt.GitLabSelfHostBuiltInExtension ** BUILD FAILED ** Xcode's output: ↳ ../../../../.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found. class PictureStream with DiagnosticableMixin { ^^^^^^^^^^^^^^^^^^^ ../../../../.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found. abstract class PictureStreamCompleter with DiagnosticableMixin { Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'path_provider' from project 'Pods') warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'image_picker' from project 'Pods') warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Flutter' from project 'Pods') Could not build the precompiled application for the device. It appears that your application still contains the default signing identifier. Try replacing 'com.example' with your signing id in Xcode: open ios/Runner.xcworkspace 中将pubspec.yaml更改为flutter_svg: ^0.17.4的原因,但我得到了这个错误。但是,如果我使用flutter_svg: ^0.18.0,则会得到以下关注错误:

flutter_svg: ^0.17.4

我也尝试使用此 Exception has occurred. FlutterError (Unable to load asset: imageurl/fs.png 软件包,但仍然存在相同错误。您能帮我解决该问题的方法吗?

谢谢。

1 个答案:

答案 0 :(得分:0)

对不起,每个人都在浪费您的时间阅读我的愚蠢问题。让我清除一下我所做的愚蠢行为。对于最新的xcode(在我的情况下为xcode 12),我在cupertino_icons: ^0.1.0文件中使用了pubspec.yaml,这就是为什么我在flutter_svg包中遇到依赖项错误的原因。它应该是be cupertino_icons: ^0.1.3flutter_svg: ^0.18.0

第二个愚蠢行为正在尝试使用image.asset()加载图像,这就是即使我使用了flutter_svg: ^0.18.0但仍然出现 Exception has occurred.Because it was searching that image url in my application asset folder.FlutterError (Unable to load asset:这个错误的原因。所以我将其更改为FadeInImage.assetNetwork

希望我的回答对我这样的问题会有所帮助。

相关问题