【问题标题】:Android Emulator: Could not resolve all artifacts for configuration ':classpath'Android 模拟器:无法解析配置“:classpath”的所有工件
【发布时间】:2021-12-04 09:13:49
【问题描述】:

当我选择 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

【问题讨论】:

  • 您需要上传文件project/build.gradle和app/project.gradle。我需要检查这 2 个文件,因为我认为您配置的数据绑定可能丢失了

标签: android flutter


【解决方案1】:

转到 ADB 管理器并擦除模拟器的数据,而不是运行它运行正常的模拟器

【讨论】:

  • 我试过了,但是不行
猜你喜欢
  • 2021-07-28
  • 1970-01-01
  • 2023-03-17
  • 1970-01-01
  • 1970-01-01
  • 2021-06-04
  • 2020-01-31
  • 2021-06-23
  • 1970-01-01
相关资源
最近更新 更多