当我将sqflite添加为项目的依赖项时,我的应用程序崩溃。仅仅添加依赖项会使应用程序崩溃。
我尝试添加权限,例如
<uses-permission android:name="android.permission.STORAGE" />
和<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
,但这并不能解决问题。
我的pubspec.yaml文件:
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
http:
video_player:
screen:
sqflite:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons:
flutter_icons:
image_path: "assets/logo.png"
android: true
ios: true
如何防止此崩溃?