为什么我不能在flutter项目中添加任何插件?

时间:2019-02-08 14:14:14

标签: android gradle dart flutter

我正在开发应用程序,在添加任何插件时出现此错误:

    * What went wrong:
    Could not resolve all files for configuration ':url_launcher:lintClassPath'.
    > Could not find com.android.tools.lint:lint-gradle:26.1.2.
      Searched in the following locations:
        - file:/E:/AndroidSDK/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom
        - file:/E:/AndroidSDK/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.jar
        - file:/E:/AndroidSDK/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom
        - file:/E:/AndroidSDK/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.jar
        - file:/E:/AndroidSDK/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom
        - file:/E:/AndroidSDK/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.jar
        - https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom
        - https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.jar
        - https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom
- https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.jar
  Required by:
      project :url_launcher
* 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 47s
Gradle task assembleDebug failed with exit code 1

我的Pubspec Yaml就像这样:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

  shimmer: ^1.0.0

  http: ^0.12.0+1

  loadmore: ^1.0.2

当我想添加url启动器插件或任何其他插件时,出现了该错误。

感谢任何建议。

我该如何解决这个问题?

0 个答案:

没有答案