Issue
I saw that lot of people had a similar problem. However, so far I couldn't find a solution.
I'm building an Android app where I have implemented some bluetooth functionality. What I'm trying to do at the moment is to create a database to store configurations for bluetooth device. For this I'm using sqflite
and path
plugins. After the implementation I'm receiving the following error:
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
My open database function:
Database _database = await openDatabase(
join(await getDatabasesPath(), 'dataset.db'),
onCreate: (db, version) {
return db.execute(
"CREATE TABLE datasets(id INTEGER PRIMARY KEY, dataset TEXT)"
);
},
version: 1,
);
return _database;
}
Solution
So finally I figured it out. The problem was within GeneratedRegistrantPlugin. Normally it should register all the Flutter plugins coming to native platform. However, in my case there was nothing(it is generated during flutter pub get). After the investigation I removed unnecessary folder example from my project and it finally allowed GeneratedRegistrantPlugin to generate correctly.
Answered By - Julian Modlinski
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.