编译后报错信息大概如下:

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) ,Re-download dependencies and sync project (requires network)The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

解决:

1.gradle-wrapper.properties文件:

distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip

2.build.gradle文件下对应的gradle版本插件version:

dependencies {
classpath ‘com.android.tools.build:gradle:3.4.0
}

插件与gradle版本对应关系如下:

AS 3.4.1 gradle问题

Android gradle插件介绍官网网址

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-12-15
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2021-10-31
  • 2021-08-14
  • 2021-06-12
  • 2021-05-03
  • 2021-08-16
相关资源
相似解决方案