flutter - 在颤振中使用 photo_manager 包的自定义媒体(图片和视频)不起作用
问题描述
我正在开发一个颤振应用程序,我想在其中构建一个自定义图库来显示我的图片和视频。我正在尝试使用 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
推荐阅读
- node.js - MongoDB Atlas 连接错误“无法连接到服务器...”
- javascript - 如何在 JavaScript 中的对象对象中获取 Top 5 和 Lowest 5 值?
- react-redux - react + redux + react-dnd 上的应用程序在组装后不起作用,为什么?
- javascript - 我可以定位多个 div(具有相同的类)以使用 javascript 转义 HTML 特殊实体吗?
- xtermjs - 如何删除 xterm.js 中的最后一行
- winforms - 编辑后如何格式化数字datagridview单元格
- ios - ios如何管理ViewController的内存
- python - 如何覆盖 argparse -h 使用信息中的 cli 名称?
- matlab - 是否可以将自定义工具箱存储库添加到附加资源管理器?
- php - 为什么我的 AJAX 脚本不向 PHP 脚本发送 GET 参数?