Android build ion error (: transformClassesWithDexForDebug)

Everything was fine and worked fine until I ran the “Android ion collector” command, and then this error occurs.

: transformClassesWithDexForDebugjava.lang.UnsupportedClassesVersionError: com.android.dx / command / Main: Unsupported Major.minor version 52.0

etc.

enter image description here

+5
source share
1 answer

It looks like you have an old version of Java. Update JDK to version 8.

You can download it: here

Also do not forget to set the JAVA_HOME variable in the new version (through Control Panel → System → Advanced → Environment Variables), and then restart. Make sure that when you create the project, it indicates that you are using the JDK version 8.

You may have a problem with gradle. To fix this, follow these steps:

npm install -g gradle ionic platform rm android ionic platform add android ionic build android 
+6
source

All Articles