Flutter webview package



我正在制作一个包含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 clean。这应该会清除任何可能阻止应用程序运行的东西。

最新更新