简体   繁体   中英

Flutter: Could not resolve all artifacts for configuration ':path_provider:classpath'

My flutter project was working fine, but after I install path_provider package it gives me the following error when trying to run it:

>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.

My development environment:

Windows 10

android studio 3.6.3

flutter_windows_v1.12.13+hotfix.9-stable

Gradle 5.6.2

You can try:

  • Go to your FlutterSDK folder, then go to \.pub-cache\hosted\pub.dartlang.org\
  • Then delete path_provider-xxx (specified version)
  • Run the app.

It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM