Android 模拟器:无法解析配置":类路径"的所有工件



当我选择一个Web chrome设备并运行flutter应用程序时,它可以工作,但当我选择Android设备并运行flutter时,构建失败

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find apksig-4.1.0.jar (com.android.tools.build:apksig:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/4.1.0/apksig-4.1.0.jar
> Could not find annotations-27.1.0.jar (com.android.tools:annotations:27.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/27.1.0/annotations-27.1.0.jar
> Could not find databinding-common-4.1.0.jar (androidx.databinding:databinding-common:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/4.1.0/databinding-common-4.1.0.jar
> Could not find baseLibrary-4.1.0.jar (com.android.databinding:baseLibrary:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/4.1.0/baseLibrary-4.1.0.jar
* 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

转到ADB经理并擦除模拟器的数据,然后运行模拟器,它可以很好地进行

最新更新