Mikhail Sharin
Mikhail Sharin

Reputation: 4065

Can't update Android gradle plugin version

I'm trying to update Android gradle plugin from 3.5.1 to 3.6.1.

And got error:

Cannot cast object 'com.android.build.gradle.internal.pipeline.TransformTask$2$1@67833830' with class 'com.android.build.gradle.internal.pipeline.TransformTask$2$1' to class 'com.android.build.gradle.internal.pipeline.TransformTask'

There is not this error on 3.5.1 - 3.5.3. It reproduce only on 3.6.0 - 3.6.1

Upvotes: 1

Views: 949

Answers (2)

m.alex
m.alex

Reputation: 46

I encountered the same thing after updating gradle plugin from version 3.5.3 to 4.0.0. It turned out, that there was a problem with AspectJ plugin com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.5. After updating the plugin to version 2.0.10 the problem disappeared.

Upvotes: 3

Pratik Butani
Pratik Butani

Reputation: 62421

As per this documentation:

Gradle Version 3.6.0

This version of the Android plugin requires the following:

  • Gradle 5.6.4. To learn more, read the section about updating Gradle.

  • SDK Build Tools 28.0.3 or higher.

It's working.

Upvotes: 0

Related Questions