Android app - failed to build

Hello,

I’m trying to build for Android an application I’m working on, but build failed with error: [java] Error: Can’t read [proguard.ClassPathEntry@24e5ddd0] (Can’t process class [com/softwareag/mobile/runtime/nui/nUITablerowElement.class] (Unsupported version number [51.0] for class format)). File nUITablerowElement.class exists in my directory D:<blah-blah>\0.0.0\AND_HTC_G1_temp__java_edit_\bin\temp_classes\com\softwareag\mobile\runtime\nui. But the funny thing is that the date when nUITablerowElement.class and nUITextfieldElement.class were created is 5th of January this year, and it seems that they are not supported by proguard. Any ideas how this can be fixed???

Here is the end of build log, with the error. If you need more detailed information, I’ll send you full log.

 [java] ProGuard, version 4.4
 [java] Error: Can't read [proguard.ClassPathEntry@24e5ddd0] (Can't process class [com/softwareag/mobile/runtime/nui/nUITablerowElement.class] (Unsupported version number [51.0] for class format))
 [java] Reading program directory [D:\Develop\Eclipse\Collaboration\_PulseMobileClient_\Builds\0.0.0\AND_HTC_G1\_temp_\_java_edit_\bin\temp_classes]

The following error occurred while executing this line:
D:\Develop\Eclipse\Collaboration_PulseMobileClient_\targets\AND_HTC_G1.xml:15: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:31: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Devices\Android\HTC\G1.xml:51: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:140: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:453: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:536: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts-crosscompile.xml:49: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Platforms\Android\platform_buildscript.xml:11: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Tools\Build\BuildScript\v1.0.0\scripts.xml:42: The following error occurred while executing this line:
C:\SoftwareAG\wMMobileDesigner\Platforms\Android\platform_buildscript.xml:270: The following error occurred while executing this line:
D:\Develop\Eclipse\Collaboration_PulseMobileClient_\Builds\0.0.0\AND_HTC_G1_temp__java_edit_\build.xml:281: Java returned: 1
<<< ERROR: Build failed for “PulseMobileClientG1EN” >>>>
BUILD SUCCESSFUL
Total time: 22 seconds

Best regards,
Grigor

Hi Grigor,

Class format number [51.0] afaik is JDK 7, you need to use JDK 6 with the Android SDK and proguard to make it work. Generally we’ve found JDK 7 to prove
incompatible with a large number of mobile SDKs and build processes.

Cheers,
Matt

Hi Matthew,

Until yesterday morning I had any issues compiling whatever project for Android using JDK 7. Now I set the environment to JDK 6, but the error is still the same.

Best regards,
Grigor

Make sure that your installed JRE in eclipse as well as the compiler compliance level are both set to a v6 JDK for your sanity, and most importantly, make sure that the java used by the ant scripts is also a JDK1.6.

Kind regards
Dave

I set JDK and JRE 6 wherever I found in eclipse, but there was no change. Finally I backed up the project, removed eclipse and all the stuffs it use. Then I extract a new one and import the project in the new environment. It works with JDK7. However, I removed JDK7 from my computer just to be sure that I’m using only JDK6. But now I have another issue with Multibuild. I receive following error:
[javac] D:\Develop\Eclipse\Collaboration_PulseMobileClient_\Builds\0.0.0\AND_HTC_G1_temp__java_edit_\src\com\softwareag\pulse\mobile\DataManager_MD_1.java:25: cannot find symbol
[javac] symbol : constructor ServerConnection_MD_CallbackAdapter(com.softwareag.pulse.mobile.DataManager)
[javac] location: class com.softwareag.pulse.mobile.ServerConnection_MD_CallbackAdapter
[javac] super(thisOuter);
[javac] ^

I have inner class declaration for callback handler, but I don’t understand why compiler makes changes on this part of the code and generate different one, that can not be compiled.

Best regards,
Grigor

Hi Grigor,

The cross compiler has executed inner class extraction which is needed for C++ and other outputs. You’re right in that it’s not technically needed for Android and so you can disable it by adding the property below to your Android device target:

We’ve just pushed an update to MobileDesigner which if you update may well fix this issue in the cross compiler anyway as I recently made some improvements to the inner class extraction. But can I ask you please send me a copy of your bcdf files which can be found in your “…\Builds\0.0.0\AND_HTC_G1_temp__bcdfs_” folder so I can fix the bug if not already solved. As you’ll have a similar compilation error in C++ most likely if the issue remains.

Cheers,
Matt