skip to Main Content

I’m upgrading to Android Studio Arctic Fox and everything is going fine except for the Gradle update.

With distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip everything works fine, but as soon as I move to distributionUrl=https://services.gradle.org/distributions/gradle-7.1.1-bin.zip I get this error:

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

There are no more details than that.

I first made the move using the upgrade tool for AGP and got the same error so I looked at what all changed and tried one change at a time to see which one is causing the problem and it is the distributionUrl.

I know there are a lot of questions and answers for this MultipleCompilationErrorsException error but they are either very outdated or talk about things like misspellings.

Anyone have any idea what the issue could be or how I can get more details regarding this problem?

Edit: since I know a lot of answers recommend switching jdk. I am currently using 11 but also tried jdk 8, same problem.

Edit: running gradlew wrapper I get this error, hopefully that helps me fix it:

......maven-push.gradle': 46: unable to resolve class MavenDeployment
   @ line 46, column 34.
                     beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
                                      ^

  1 error

Edit: An open source project I had as a module had an extra script and that seemed to be the issue, removing that file that I don’t need has fixed it.

2

Answers


  1. I had the same problem.

    In my case the problem was solved by editing gradlewrapper.properties file:

    I changed distribution url from
    https://services.gradle.org/distributions/gradle-7.1.1-bin.zip
    to
    https://services.gradle.org/distributions/gradle-7.1.1-all.zip.

    The problem is with bin which I changed to all.

    Login or Signup to reply.
  2. After changing the version in the properties file you still need to run ./gradlew wrapper to finalize the upgrade by downloading the upgraded Gradle wrapper. Then try running the build from within the console with --stacktrace --debug to debug the error more thoroughly.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search