Flutter path_provider 错误 - 无法解析项目:path_provider_linux

CHO*_*BIN 3 android dart android-studio flutter

我已经实现了各种方法,但每次运行 android 时都会出现错误。如果删除path_provier_macos文件夹,则会出现Linux错误。您当前使用的path_provier:^1.6.11。降低path_provier版本是相同的。请告诉我解决方案。

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':path_provider:compileDebugAidl'.
> Could not resolve all task dependencies for configuration
':path_provider:debugCompileClasspath'.
   > Could not resolve project :path_provider_macos.
     Required by:
         project :path_provider
      > Unable to find a matching configuration of project :path_provider_macos:
          - None of the consumable configurations have attributes.
   > Could not resolve project :path_provider_linux.
     Required by:
         project :path_provider
      > Unable to find a matching configuration of project :path_provider_linux:
          - None of the consumable configurations have attributes.

* 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 12s
Finished with error: Gradle task assembleDebug failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

Ara*_*chi 5

  • 转到您的 Flutter sdk 文件夹。
  • 转到 [.pub-cache\hosted\pub.dartlang.org\ 或 .pub-cache\hosted\pub.flutter-io.cn\ ]
  • 删除所有 path_provider 文件夹。
  • 酒吧得到
  • 运行您的应用程序。

我希望这能解决您的问题!