首页 > 解决方案 > 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

标签: javaandroidflutter

解决方案


你可以试试:

  • 转到您的 FlutterSDK 文件夹,然后转到\.pub-cache\hosted\pub.dartlang.org\
  • 然后删除path_provider-xxx(指定版本)
  • 运行应用程序。

它对我有用。


推荐阅读