Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 在颤振中使用photo_manager软件包的自定义媒体(图片和视频)不工作_Flutter_Compiler Errors_Package_Photo Gallery - Fatal编程技术网

Flutter 在颤振中使用photo_manager软件包的自定义媒体(图片和视频)不工作

Flutter 在颤振中使用photo_manager软件包的自定义媒体(图片和视频)不工作,flutter,compiler-errors,package,photo-gallery,Flutter,Compiler Errors,Package,Photo Gallery,我正在开发一个Flitter应用程序,我想建立一个自定义的图库来显示我的图片和视频。我正试图使用photo_manager包来实现这一点,但是每当我将该包添加到我的pubspec.yaml并运行我的应用程序时,我都会在不使用该包的情况下收到下面的错误 e: java.io.IOException: Cannot run program "C:\Program Files\Android\Android Studio\jre\jre\bin\java" (in director

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

e: java.io.IOException: Cannot run program "C:\Program Files\Android\Android Studio\jre\jre\bin\java" (in directory "C:\Users\Sylvester\AppData\Local\kotlin\daemon"): 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 Files\Android\Android Studio\jre\jre\bin\java": 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

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

flutter clean
flutter pub upgrade
flutter pub get