【问题标题】:Flutter webview packageFlutter webview 包
【发布时间】:2021-03-12 18:13:41
【问题描述】:

我正在开发一个包含 webview_flutter 包的应用程序,每次我尝试添加这个包然后运行应用程序进行品尝时,我都会得到:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':webview_flutter'.
> Could not resolve all artifacts for configuration ':webview_flutter:classpath'.
   > Could not find gradle-3.3.0.jar (com.android.tools.build:gradle:3.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.jar
   > Could not find builder-3.3.0.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 sdklib-26.3.0.jar (com.android.tools:sdklib:26.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.3.0/sdklib-26.3.0.jar
   > Could not find bundletool-0.6.0.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 find protos-26.3.0.jar (com.android.tools.analytics-library:protos:26.3.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.3.0/protos-26.3.0.jar
> Could not get unknown property 'android' for project ':webview_flutter' of type org.gradle.api.Project.

* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1

我多次尝试重建项目并尝试了一些其他版本的 Gradle,但都没有成功。 有人可以帮忙吗? 谢谢

【问题讨论】:

    标签: flutter webview


    【解决方案1】:

    尝试在控制台中使用命令flutter clean。这应该会清除任何可能阻止您的应用运行的内容。

    【讨论】:

    • 它删除所有包然后我使用 pub get 然后我得到相同的消息
    猜你喜欢
    • 2021-04-15
    • 2021-04-28
    • 1970-01-01
    • 2020-12-11
    • 2022-01-01
    • 1970-01-01
    • 2019-10-09
    • 2020-08-13
    • 2018-10-25
    相关资源
    最近更新 更多