如果我尝试在pubspec.yml中添加flutter_uploader,则会出现异常
我添加了flutter_uploader并在Android清单文件中赋予了写权限
dependencies:
path_provider: ^1.3.0
flutter_uploader: ^1.0.5+1
获取异常
E/UploaderInitializer(29574): Failed to load meta-data, NameNotFound: ComponentInfo{com.example.flutter_app/com.bluechilli.flutteruploader.FlutterUploaderInitializer}
D/AndroidRuntime(29574): Shutting down VM
Lost connection to device.
E/AndroidRuntime(29574): FATAL EXCEPTION: main
E/AndroidRuntime(29574): Process: com.example.flutter_app, PID: 29574
E/AndroidRuntime(29574): java.lang.IllegalStateException: WorkManager is not initialized properly. You have explicitly disabled WorkManagerInitializer in your manifest, have not manually called WorkManager#initialize at this point, and your Application does not implement Configuration.Provider.
E/AndroidRuntime(29574): at androidx.work.impl.WorkManagerImpl.getInstance(WorkManagerImpl.java:140)
E/AndroidRuntime(29574): at androidx.work.WorkManager.getInstance(WorkManager.java:180)
E/AndroidRuntime(29574): at com.bluechilli.flutteruploader.FlutterUploaderPlugin.onActivityStarted(FlutterUploaderPlugin.java:193)
E/AndroidRuntime(29574): at android.app.Application.dispatchActivityStarted(Application.java:230)
E/AndroidRuntime(29574): at android.app.Activity.onStart(Activity.java:1278)
E/AndroidRuntime(29574): at io.flutter.app.FlutterActivity.onStart(FlutterActivity.java:94)
E/AndroidRuntime(29574): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
E/AndroidRuntime(29574): at android.app.Activity.performStart(Activity.java:7157)
E/AndroidRuntime(29574): at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)
E/AndroidRuntime(29574): at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
E/AndroidRuntime(29574): at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
E/AndroidRuntime(29574): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
E/AndroidRuntime(29574): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
E/AndroidRuntime(29574): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
E/AndroidRuntime(29574): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(29574): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(29574): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(29574): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29574): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(29574): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process (29574): Sending signal. PID: 29574 SIG: 9
Could not update files on device: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:45896/elFZHo6GUzk=/
我无法运行Flutter android模拟器。