在flutter中使用photo_manager包的自定义媒体(图片和视频)无法工作



我正在开发一个flutter应用程序,我想在那里建立一个自定义库来显示我的图片和视频。我正试图使用photo_manager包来实现这一点,然而,每当我将该包添加到我的pubspec.yaml并运行我的应用程序时,我都会在不使用该包的情况下收到以下错误。

e: java.io.IOException: Cannot run program "C:Program FilesAndroidAndroid Studiojrejrebinjava" (in directory "C:UsersSylvesterAppDataLocalkotlindaemon"): CreateProcess error=2, The system cannot find the file specified
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':photo_manager:compileDebugKotlin'.
> java.io.IOException: Cannot run program "C:Program FilesAndroidAndroid Studiojrejrebinjava": CreateProcess error=2, The system cannot find the file specified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 57s
Exception: Gradle task assembleDebug failed with exit code 1

请提供任何帮助,将不胜感激

我运行了这些命令,它似乎修复了

flutter clean
flutter pub upgrade
flutter pub get