Unable to load image from ../url.png file in flutter

218 views Asked by At

I am new at flutter so may be it's a silly questions but it will helpful if someone instruct me what to do.Now my problem is i am getting following error

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

I thought its svg error thats why i changed in the pubspec.yaml from flutter_svg: ^0.17.4 to flutter_svg: ^0.18.0 then i get this error.But if i use flutter_svg: ^0.17.4 then i get following error:

 Exception has occurred. FlutterError (Unable to load asset: imageurl/fs.png

I also tried to use this websafe_svg: ^1.1.4 package but still same error.Can you help me out what can i do for resolve this problem?

Thanks In Advance.

1

There are 1 answers

0
Emon On BEST ANSWER

Sorry everybody for wasting your time to read my stupid question.Let me clear what stupidity i have done. For latest xcode (In my case xcode 12) i used cupertino_icons: ^0.1.0 in pubspec.yaml file, that is why i was getting dependencies error for flutter_svg package.It should be cupertino_icons: ^0.1.3 and flutter_svg: ^0.18.0

Second stupidity is was trying to load image using image.asset() thats why even though i used flutter_svg: ^0.18.0 but still i was getting Exception has occurred.Because it was searching that image url in my application asset folder.FlutterError (Unable to load asset: this error. So i changed it to FadeInImage.assetNetwork

Hope my answer will help someone if any problem occur like mine.