reidisaki
reidisaki

Reputation: 1534

compileReleaseJavaWithJavaC failed for react native modules when building a release build

Task :react-native-device-info:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

The error makes sense , and the file is not there, but I have no idea why its not there? It is created when I run a debug version of the app and debug versions of my libraries, react-native-device-info, react-orientation-locker etc.. I've cleaned, gradle synched, rebuilt etc. but when trying to assemble or install a release build I get this error within seconds. What is causing the Java

Upvotes: 0

Views: 4082

Answers (2)

ChristophK
ChristophK

Reputation: 3223

I had the same problem in an android project (without react) when I added a library module.

After searching for a solution for quite some time, I finally deleted the .gradle directory in the project root folder.

This solved the problem for me.

Upvotes: 10

reidisaki
reidisaki

Reputation: 1534

update android gradle plugin to 3.3 update gradle to 4.10.3

fixed the issue for me.

Upvotes: 0

Related Questions