Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Voting: 
Vote up!
0 Votes
2 Replies
Answered

Kony Android build fails with java.lang.UnsupportedClassVersionError

Question asked by Sreenivas N on Apr 07, 2017 06:52 EDT

Hi, Is there a way to avoid the below error eventhough if we upgrade the android SDK version to 25?  java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 [exec-shell] [dx] at java.lang.ClassLoader.defineClass1(Native Method) [exec-shell] [dx] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [exec-shell] [dx] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [exec-shell] [dx] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [exec-shell] [dx] at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [exec-shell] [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [exec-shell] [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [exec-shell] [dx] at java.security.AccessController.doPrivileged(Native Method) [exec-shell] [dx] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [exec-shell] [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [exec-shell] [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:412) [exec-shell] [dx] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [exec-shell] [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [exec-shell] [dx] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) [exec-shell] [dx] Exception in thread "main" Note: I am using kony 6.5 and kony 7.2 for different projects with the same android sdk where kony 7.2 needs android sdk upgradation and 6.5 doesn't. And I have gone through the below link which doesnt give info on how to work with kony 6.5 eventhough if we upgrade android sdk version. http://community.kony.com/developer/forum/kony-android-build-fails-javalangunsupportedclassversionerror   Greetings, Sreenivas  

Vote up!
0 votes
Vote down!

Hi Sreenivas,

Thank you for contacting Kony.

The only way to avoid this is by having two sets of build tools inside(android emulator->sdk) or having 2 sets of android emulators. One for 6.5 and another for 7.2.

You will have to interchange between the two sets when you are using 6.5 and 7.2 in order for it to work if you are using build tools approach. The other one will not require any extra step. You just need to give the appropriate sdk in the Android Home of the IDEs.

Thank you
Rashmi Menon

Customer Success Engineering

 

Replied by: Apr 08, 2017 06:33 EDT
Gold
Kony Answered Certificate
Vote up!
0 votes
Vote down!

Hi Sreenivas,

As mentioned above, please look into guidelines given under the heading <<If you have two different versions of Kony Visualizer Enterprise, you need to follow few guidelines:>> in the below guide, to maintain android build tools supporting for Kiny Visualizer Enterprise and its previous Kony Studio versions.

http://docs.kony.com/7_x_PDFs/visualizer/KonyViz721_AndBuild.pdf

Thanks,
Madhuri C.
Customer Success Engineering.
 

Answered by: Apr 10, 2017 02:51 EDT
Gold