Q:

React Native Build Error for Android after Gradle Upgrade

What went wrong:
A problem occurred configuring project ':app'.

Could not generate a proxy class for class com.android.build.gradle.tasks.BuildArtifactReportTask.

A:

I got the same problem and solved it by update my JDK version from 1.8.0_20 to 1.8.0_171. You may try update your JDK version as well.

A:

This is want I did to followed to fix.
I had already updated java.
But the important thing is to update JAVA_HOME variable which react-native-cli checks when executing its build process. I have had the latest 1.8.0_191 update but still the build failed.
So this is how I solved it. By making sure my react-native-cli refers to latest JDK by means of env variable.

