469,270 Members | 1,026 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Proguard Error with ant/antenna

I get the following proguard error:
[wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify
the proper '-keep' optons?
Any idea what is wrong?
Thanks,
earamsey

------- actual ant output: ------------
[wtkobfuscate] Obfuscating C:\Projects\J2ME\CellStory\bin\CellStory.jar with
ProGuard
[wtkobfuscate] ProGuard, version 3.2
[wtkobfuscate] Reading jars...
[wtkobfuscate] Reading program jar
[C:\Projects\J2ME\CellStory\bin\CellStory.jar]
[wtkobfuscate] Reading library zip
[C:\WTK22\wtklib\devices\Series_60_MIDP_SDK_2_1\lib \kmidp20.zip]
[wtkobfuscate] Removing unused library classes...
[wtkobfuscate] Original number of library classes: 305
[wtkobfuscate] Final number of library classes: 6
[wtkobfuscate] Shrinking...
[wtkobfuscate] Removing unused program classes and class elements...
[wtkobfuscate] Original number of program classes: 1
[wtkobfuscate] Final number of program classes: 0
[wtkobfuscate] java.io.IOException: The output jar is empty. Did you
specify the proper '-keep' options?

^^^^^___Error that I get is here
[wtkobfuscate] at proguard.ProGuard.shrink(ProGuard.java:474)
[wtkobfuscate] at proguard.ProGuard.execute(ProGuard.java:86)
[wtkobfuscate] at proguard.ProGuard.main(ProGuard.java:916)

Here is my build.xml file:
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="MIDP2.0" default="n66xx" basedir=".">
  3. <description>
  4. Build file for MyLittleProject
  5. </description>
  6. <!-- predefined antenna tasks -->
  7. <taskdef resource="antenna.properties"/>
  8. <!-- ProGuard home -->
  9. <property name="wtk.proguard.home" value="C:\proguard3.2"/>
  10. <!-- RetroGuard home -->
  11. <property name="wtk.retroguard.home" value="C:\retroguard-v2.0.2"/>
  12. <property name="midlet.name" value="MyLittleProject"/>
  13. <property name="midlet.home" value="C:\Projects\J2ME\MyLittleProject"/>
  14. <target name="build" description="Builds everything">
  15. <antcall target="n66xx"/>
  16. </target>
  17. <target name="n66xx" description="Builds Nokia Models 6600 and 6620">
  18. <ant dir="devices/nokia66xx" inheritall="true" target="build"/>
  19. </target>
  20. <target name="cellstory_init" description="Create directory structure">
  21. <property name="src_pp" location="${preproc_dir}"/>
  22. <!-- set global properties -->
  23. <property name="src" location="src"/>
  24. <property name="bin" location="bin"/>
  25. <property name="res" location="res"/>
  26. <property name="classes" location="classes"/>
  27. <!-- Create the timestamp -->
  28. <tstamp/>
  29. <!-- Make directories -->
  30. <mkdir dir="${src}"/>
  31. <mkdir dir="${src_pp}"/>
  32. <mkdir dir="${bin}"/>
  33. <mkdir dir="${res}"/>
  34. <mkdir dir="${classes}"/>
  35. </target>
  36. <target name="cellstory" depends="cellstory_init" description="Build it
  37. all">
  38. <wtkjad
  39. jadfile="${bin}/${midlet.name}.jad"
  40. jarfile="${midlet.name}.jar"
  41. name="MyLittleProject"
  42. vendor="Wizzards and Lizzards"
  43. version="1.0.0">
  44. <midlet
  45. name="${midlet.name}"
  46. icon="${midlet.name}.png"
  47. class="${midlet.name}.class"/>
  48. <attribute
  49. name="deleteConfirm"
  50. value="Do you really want to delete me?"/>
  51. </wtkjad>
  52. <!-- do preprocessing -->
  53. <wtkpreprocess
  54. srcdir="${src}"
  55. destdir="${src_pp}"
  56. symbols="${symbols}"/>
  57. <!-- Compile the code -->
  58. <wtkbuild
  59. srcdir="${src_pp}"
  60. destdir="${classes}"
  61. deprecation="on"
  62. target="1.4"
  63. source="1.4"/>
  64. <!-- Package the classes -->
  65. <wtkpackage
  66. jarfile="${bin}/${midlet.name}.jar"
  67. jadfile="${bin}/${midlet.name}.jad"
  68. obfuscate="false"
  69. preverify="false">
  70. <fileset dir="${classes}" includes="**/*.class"/>
  71. <fileset dir="${res}" includes="**"/>
  72. </wtkpackage>
  73. <wtkobfuscate
  74. jarfile="${bin}/${midlet.name}.jar"
  75. jadfile="${bin}/${midlet.name}.jad"
  76. tojarfile="${bin}/${midlet.name}._jar"
  77. obfuscator="proguard">
  78. </wtkobfuscate>
  79. <wtkpreverify jarfile="${bin}/${midlet.name}.jar"/>
  80. <!-- run -->
  81. <wtkrun jadfile="${bin}/${midlet.name}.jad"
  82. device="Series_60_MIDP_SDK_2_1"/>
  83. </target>
  84. <target name="cleanbuild" description="Cleans and builds">
  85. <ant dir="devices/nokia66xx" inheritall="true" target="cleanbuild"/>
  86. </target>
  87. </project>
  88.  

Jul 18 '05 #1
0 5869

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Gregory | last post: by
4 posts views Thread by Joel Whitehouse | last post: by
7 posts views Thread by p | last post: by
3 posts views Thread by Manuel | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.