Your runtime runs a different version of Java than your compiler - 52.0 introduces Java SE 8
On Linux, type:
sudo update-alternatives
The output will look like this:
There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 2 auto mode 1 /usr/lib/jvm/java-7-oracle/jre/bin/java 2 manual mode * 2 /usr/lib/jvm/java-8-oracle/jre/bin/java 1 manual mode Press <enter> to keep the current choice[*], or type selection number:
Choose 2
Then compile your project:
./gradlew assembleDebug
This is fixed for me :)
On Windows, you can easily do this using the Java Control Panel - more on that here !
Wills
source share