Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 205
Naveen Vignesh Avatar asked Apr 22 '18 03:04

Naveen Vignesh


People also ask

Why does react native init not work with Gradle?

This happens because react-native init is always shipping the latest version of Gradle to your android project, and third party libraries might not have support for that Gradle version, making your Gradle version incompatible with the library. What you need to do is install a earlier version of Gradle for your project and then rebuild your app.

How do I upgrade my React Native project?

Because typical React Native projects are essentially made up of an Android project, an iOS project, and a JavaScript project, upgrading can be rather tricky. There's currently two ways for upgrading your React Native project: by using React Native CLI or manually with Upgrade Helper.

How to generate release APK for React Native android project?

Select APK to generate release APK for your React Native Android project. Then, Click on Next Select passwords for the keystore and key and rnter the certificate information. Thus, click on OK, then click on Next.

Why does my React Native project keep crashing?

These sort of errors are usually related to caching, it's recommended to install react-native-clean-project to clear all your project's cache and then you can run it again.


1 Answers

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.

like image 184
ximing liu Avatar answered Sep 23 '22 21:09

ximing liu