No implementation found for method getDatabasesPath
π Bug Report
I am trying to use this code
CachedNetworkImage( imageUrl: "http://via.placeholder.com/200x150", imageBuilder: (context, imageProvider) => Container( decoration: BoxDecoration( image: DecorationImage( image: imageProvider, fit: BoxFit.cover, colorFilter: ColorFilter.mode(Colors.red, BlendMode.colorBurn)), ), ), placeholder: (context, url) => CircularProgressIndicator(), errorWidget: (context, url, error) => Icon(Icons.error), ),
but I am getting this error
E/flutter ( 8610): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
E/flutter ( 8610): #0 MethodChannel._invokeMethod
platform_channel.dart:308
E/flutter ( 8610):
Expected behavior
Reproduction steps
Configuration
Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel stable, 3.10.6, on Microsoft Windows [versΓo 10.0.22621.1992], locale en-US) [β] Windows Version (Installed version of Windows is version 10 or higher) [β] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [β] Chrome - develop for the web [β] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.27) [β] Android Studio (version 2022.2) [β] VS Code (version 1.81.0) [β] Connected device (4 available) [β] Network resources
β’ No issues found!
Version: Flutter 3.10.6 β’ channel stable β’ https://github.com/flutter/flutter.git Framework β’ revision f468f3366c (4 weeks ago) β’ 2023-07-12 15:19:05 -0700 Engine β’ revision cdbeda788a Tools β’ Dart 3.0.6 β’ DevTools 2.23.1
Platform:
- [ ] :iphone: iOS
- [x] :robot: Android
You're trying to run it on an Android device or as a Windows app?
You're trying to run it on an Android device or as a Windows app?
Android device
It's been a while, so you've probably already discovered how to fix it, but just in case, I will say what worked for me. My similar code didn't work right away when I installed flutter_cached_network_image while already debugging. All I needed to do was stop debugging and build the app again. I guess that otherwise the dependency may not have the necessary permissions to handle cache properly.