Diego Plentz
Diego Plentz

Reputation: 7190

Gradle failling after update to buildTools 27.0.3

After updating to build tools 27.0.3, my build stopped working with a NullPointerException.

$ ./gradlew main:build
Starting a Gradle Daemon (subsequent builds will be faster)
Parallel execution with configuration on demand is an incubating feature.

> Configure project :main 
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)


FAILURE: Build failed with an exception.

* What went wrong:
Failed to notify task execution graph listener.
> java.lang.NullPointerException (no error message)
> java.lang.NullPointerException (no error message)

fullstacktrace: https://gist.github.com/plentz/59b676fc86dd4c3bfe2333c89b82c506

build.gradle: https://gist.github.com/plentz/eac62d1c5d207affba6153b0efb2e1ca

Upvotes: 2

Views: 882

Answers (2)

CoderSpinoza
CoderSpinoza

Reputation: 2165

I was also experiencing this issue on AGP 3.1.0 and 3.1.1. I downgraded the plugin to 3.0.0 to fix this issue, but with a second thought, just decided to go on with using Android Studio 3.2 canary build with AGP 3.2.0 alpha, where the issue seems to be resolved.

The bug seems to be fixed somewhere during the alpha revisions, so just go on with the latest, which is AGP 3.2.0-alpha10 for now. :)

Upvotes: 1

webzooh
webzooh

Reputation: 356

Try to remove your_project_path/.gradle then restart Android studio and re-compile the project

Upvotes: 0

Related Questions