Skip to content
Advertisement

Gradle build: Java plugin not compatible with Android plugins

When I build, I have the error

The ‘java’ plugin has been applied, but it is not compatible with the Android plugins.

The internet answers says to remove the line “apply plugin: ‘java'” and the file gradle.init, but I can find neither in my environment… Where exactly is the java plugin applied, and how do I remove it?

My build.gradle looks like this:

JavaScript

Advertisement

Answer

Please remove the following blocks from your build.gradle:-

JavaScript

and

JavaScript

Both blocks are for java applications not for android apps. Please see this for more info on building APK

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement