java - Flutter:无法解析配置“:path_provider:classpath”的所有工件
问题描述
我的颤振项目运行良好,但是在我安装 path_provider 包后,尝试运行它时出现以下错误:
>FAILURE: Build failed with an exception.
> * What went wrong:
A problem occurred configuring project ':path_provider'.
> Could not resolve all artifacts for configuration ':path_provider:classpath'.
> Could not find builder.jar (com.android.tools.build:builder:3.3.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.3.0/builder-3.3.0.jar
> Could not find bundletool.jar (com.android.tools.build:bundletool:0.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.6.0/bundletool-0.6.0.jar
> Could not get unknown property 'android' for project ':path_provider' of type org.gradle.api.Project.
我的开发环境:
视窗 10
安卓工作室 3.6.3
flutter_windows_v1.12.13+hotfix.9-stable
摇篮 5.6.2
解决方案
你可以试试:
- 转到您的 FlutterSDK 文件夹,然后转到
\.pub-cache\hosted\pub.dartlang.org\
- 然后删除path_provider-xxx(指定版本)
- 运行应用程序。
它对我有用。
推荐阅读
- web-component - 预渲染使用 StencilJS Web 组件构建的网站页面
- ios - ViewController - 全屏
- php - 查询上个月的假期/病假
- typescript - 我如何 Object.assign 给 Typescript 中对象的子属性?
- java - 如果失败,如何重新启动线程
- python - 如何从模型本身发现火炬模型名称?
- c - 将 C 回调(无上下文)包装到 Swift 闭包中
- ruby-on-rails - 在 rails 中替代 group_by
- demandware - 为 Salesforce 商务云市场构建应用程序
- reactjs - 在 React-Router 的 Not Found 页面上隐藏公共组件