Everything was fine and working perfectly till i execute the command "ionic build android" and then this error occurs.
:transformClassesWithDexForDebugjava.lang.UnsupportedClassesVersionError: com.android.dx/command/Main : Unsupported Major.minor version 52.0
and so on......
Looks like you have an old version of Java. Update your JDK to Version 8.
You can download it : here
Also don't forget to set your JAVA_HOME variable to new version (via Control Panel -> System -> Advanced -> Environment Variables) and then restart. Make sure that when you build your project, it will indicate that you're using JDK version 8.
You might have gradle problem. To fix it, do the following:
npm install -g gradle
ionic platform rm android
ionic platform add android
ionic build android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With