Gradle build failing after update to Android studio 2.3 Canary 3

后端 未结 9 1924
北海茫月
北海茫月 2021-01-03 20:19

I\'ve recently updated the android studio version of my project from 2.3 Canary 2 to 2.3 Canary 3. Since then the gradle build is failing every time with this error:

相关标签:
9条回答
  • 2021-01-03 20:59

    If you're using the gradle wrapper, make sure that the distributionUrl in your gradle/wrapper/gradle-wrapper.properties is correct and up to date. As of this writing, I use this:

     distributionBase=GRADLE_USER_HOME
     distributionPath=wrapper/dists
     zipStoreBase=GRADLE_USER_HOME
     zipStorePath=wrapper/dists
     distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
    
    0 讨论(0)
  • 2021-01-03 21:03

    I had the same problem, fixed with checking gradle home path. This cannary build is no more working with gradle-2.14.1

    The below link shows, point gradle path to gradle 3.2 directory.

    0 讨论(0)
  • 2021-01-03 21:09

    The problem is the last version of tools 2.3.0-alpha3. Try to use the 2.3.0-alpha2 in project build.gradle

    classpath 'com.android.tools.build:gradle:2.3.0-alpha2'
    
    0 讨论(0)
  • 2021-01-03 21:11

    You may face this problem with your previous Project, We will notice that when you create a new application the Gradle build will complete successfully. So just copy paste the grade setting from new project to the previous project.

    Steps:

    1) Replace Dependencies in build.gradle (project) by this code :

    classpath 'com.android.tools.build:gradle:2.3.0'

    2) Replace distributionUrl in Gradle-wrapper.properties by this code:

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

    3) Don't forget to use Gradle default wrapper in Project level setting.

    See this picture for more information

    0 讨论(0)
  • 2021-01-03 21:16

    try upgrading the Gradle version to 3.2.1

    0 讨论(0)
  • 2021-01-03 21:22

    change

    build:gradle:

    from

    dependencies { classpath 'com.android.tools.build:gradle +'

    to

    dependencies { classpath 'com.android.tools.build:gradle:2.2.3'

    0 讨论(0)
提交回复
热议问题