FlutterCould not determine the dependencies of task ‘:path

    技术2022-07-15  73

    FAILURE: Build failed with an exception.

    * What went wrong: Could not determine the dependencies of task ':app:preDebugBuild'. > Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.    > Could not resolve project :shared_preferences_macos.      Required by:          project :app > project :flutter > project :shared_preferences       > Unable to find a matching configuration of project :shared_preferences_macos:           - None of the consumable configurations have attributes.    > Could not resolve project :shared_preferences_web.      Required by:          project :app > project :flutter > project :shared_preferences       > Unable to find a matching configuration of project :shared_preferences_web:           - None of the consumable configurations have attributes.    > Could not resolve project :path_provider_macos.      Required by:          project :app > project :flutter > 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 :app > project :flutter > 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 0s 报以上类似错误解决办法:

    第一步:找到冲突包右键打开文件所在目录 

    第二步:删掉报错的文件(如果不想找直接全部删掉也行) 然后重新 flutter pub get 如果不想敲命令直接 点击 yaml 文件上的 packages get  按钮

    Processed: 0.010, SQL: 9