Lines Matching full:code
24 While preparing a configuration for processing your code, you may bump into a
109 <dd>ProGuard can't find a class or interface that your code is accessing by
116 like "<code>(MyClass)Class.forName(variable).newInstance()</code>".
118 with an option like "<code>-keep class MyClass</code>", or their
119 implementations with an option like "<code>-keep class * implements
120 MyClass</code>". You can switch off these notes by specifying the
121 <a href="usage.html#dontnote"><code>-dontnote</code></a> option.</dd>
126 "<code>.getField("myField")</code>". Depending on your application, you
128 keep them with an option like "<code>-keep class MyClass { MyFieldType
129 myField; }</code>". Otherwise, ProGuard might remove or obfuscate the
133 href="usage.html#dontnote"><code>-dontnote</code></a> option.</dd>
137 <dd>Your configuration contains a <code>-keep</code> option to preserve the
138 given method (or field), but no <code>-keep</code> option for the given
144 href="usage.html#dontnote"><code>-dontnote</code></a> option.</dd>
149 a <code>-keepclassmembers/-keepclasseswithmembers</code> option to
154 wildcard "<code>*;</code>". You can switch off these notes by specifying
155 the <a href="usage.html#dontnote"><code>-dontnote</code></a> option.</dd>
165 href="usage.html#dontnote"><code>-dontnote</code></a> option.</dd>
187 libraries that are referenced by your code must be specified, including
189 the <a href="usage.html#libraryjars"><code>-libraryjars</code></a> option.
192 <code>javax.crypto</code> class, you probably still have to specify
193 <code>jce.jar</code>, next to the more common <code>rt.jar</code>.
197 href="usage.html#ignorewarnings"><code>-ignorewarnings</code></a> option,
198 or even the <a href="usage.html#dontwarn"><code>-dontwarn</code></a>
203 it can't find a <code>java.awt</code> class, then some library that you
204 are using is referring to <code>java.awt</code>. This is a bit shady, since
206 anyway, you can let ProGuard accept it with "<code>-dontwarn
207 java.awt.**</code>".</dd>
213 <a href="usage.html#ignorewarnings"><code>-ignorewarnings</code></a>
214 or <a href="usage.html#dontwarn"><code>-dontwarn</code></a>, but it didn't
216 need the missing classes to make sense of the code. Preferably, you would
220 corresponding <a href="usage.html#injars"><code>-injars</code></a> option:
221 "<code>-injars
222 myapplication.jar(!somepackage/SomeUnusedClass.class)</code>". Hopefully,
225 (<a href="usage.html#dontoptimize"><code>-dontoptimize</code></a>) and
227 (<a href="usage.html#dontpreverify"><code>-dontpreverify</code></a>).</dd>
240 <a href="usage.html#dontskipnonpubliclibraryclassmembers"><code>-dontskipnonpubliclibraryclassmembers</code></a>
255 extending, implementing or just referencing them, your processed code will
261 program code (specified with <a
262 href="usage.html#injars"><code>-injars</code></a>) and library code
264 href="usage.html#libraryjars"><code>-libraryjars</code></a>), and try
274 in the <code>WEB-INF/classes</code> directory in a war should be packaged
275 in a jar and put in the <code>WEB-INF/lib</code> directory. If you don't
277 href="usage.html#ignorewarnings"><code>-ignorewarnings</code></a> option,
278 or even the <a href="usage.html#dontwarn"><code>-dontwarn</code></a>
283 <dd>There is a conflict between a <code>-keep</code> option in the
290 href="usage.html#ignorewarnings"><code>-ignorewarnings</code></a> option,
291 or even the <a href="usage.html#dontwarn"><code>-dontwarn</code></a>
296 <dd>There is a conflict between some new program code and the mapping file, in
305 href="usage.html#ignorewarnings"><code>-ignorewarnings</code></a> option,
306 or even the <a href="usage.html#dontwarn"><code>-dontwarn</code></a>
308 href="usage.html#useuniqueclassmembernames"><code>-useuniqueclassmembernames</code></a>
322 href="usage.html#keep"><code>-keep</code></a> options, or you mistyped the
340 the path <code><java.home>/lib/rt.jar</code> by
341 <code><java.home>/../Classes/classes.jar</code>.</dd>
348 option <code>-DsuppressSwingDropSupport=true</code> when running the
362 usual <code>-Xms</code> and <code>-Xmx</code> options). You can also
370 <dd>This error might occur when processing a large code base on Windows
372 size of the Java virtual machine (with the usual <code>-Xss</code> option)
373 should help too. In practice however, the <code>-Xss</code> setting
384 href="usage.html#dontoptimize"><code>-dontoptimize</code></a> option. In
399 If ProGuard seems to run fine, but your processed code doesn't look right,
412 href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
418 class files that are in the <code>WEB-INF/classes</code> directory in a
419 war should be packaged in a jar and put in the <code>WEB-INF/lib</code>
428 href="usage.html#printseeds"><code>-printseeds</code></a> option to see
434 an option like "<code>-keep interface MyMarkerInterface</code>".
438 step. You can explicitly keep all annotation classes in your program code
439 with an option like "<code>-keep @interface *</code>".<dd>
443 <dd>If the names of the local variables and parameters in your obfuscated code
448 <code>LocalVariableTable</code> or <code>LocalVariableTypeTable</code>
463 happen if some code is optimized radically. Possible work-arounds: let the
464 java compiler not produce debug information (<code>-g:none</code>), or let
466 (by <i>not</i> keeping the attributes <code>LocalVariableTable</code>
467 and <code>LocalVariableTypeTable</code>
468 with <a href="usage.html#keepattributes"><code>-keepattributes</code></a>),
470 (<a href="usage.html#dontoptimize"><code>-dontoptimize</code></a>).</dd>
474 <dd>This error may have various causes, but if dx is tripping over some code
477 to <code>android-sdk/tools/proguard/lib</code>. If that doesn't help,
493 <code>preverify</code> tool always unpacks the jars, so class files with
496 href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
502 href="usage.html#dontoptimize"><code>-dontoptimize</code></a> option. You
510 <a href="usage.html#microedition"><code>-microedition</code></a> option,
524 information is present in your compiled code to start with. Notably the Ant
534 <dd>Your code is probably calling <code>Class.forName</code>, trying to create
536 arguments, like <code>Class.forName("mypackage.MyClass")</code>. For
537 variable name arguments like <code>Class.forName(someClass)</code>, you
539 href="usage.html#keep"><code>-keep</code></a> option, e.g. "<code>-keep
540 class mypackage.MyClass</code>" or "<code>-keep class * implements
541 mypackage.MyInterface</code>".</dd>
545 <dd>Your code is probably calling something like
546 <code>myClass.getMethod</code>, trying to find some method dynamically.
549 href="usage.html#keep"><code>-keep</code></a> option, e.g. "<code>-keep
550 class mypackage.MyClass { void myMethod(); }</code>".
553 <code>values</code> or <code>valueOf</code>, you probably have to keep
559 <dd>Your processed code may be unable to find some resource files. ProGuard
563 href="usage.html#adaptresourcefilenames"><code>-adaptresourcefilenames</code></a>
565 href="usage.html#adaptresourcefilecontents"><code>-adaptresourcefilecontents</code></a>.
569 href="usage.html#keepdirectories"><code>-keepdirectories</code></a>.
570 Note that Sun advises against calling <code>Class.getResource()</code> for
579 <code><a href="usage.html#keepattributes">-keepattributes</a>
580 *Annotation*</code>.</dd>
585 <code>-jar</code> instead of the option <code>-classpath</code>. The java
587 contain a manifest file (<code>META-INF/MANIFEST.MF</code>), if the
588 manifest file doesn't specify a main class (<code>Main-Class:</code> ...),
597 <code>META-INF/INDEX.LIST</code>, listing all class files in the jar.
601 (<code>-injars in.jar(!META-INF/INDEX.LIST)</code
602 after having applied ProGuard (<code>jar -i out.jar</code>).
609 href="usage.html#microedition"><code>-microedition</code></a> option, so
617 options <code><a href="usage.html#repackageclasses">-repackageclasses</a>
618 ''</code> and <a
619 href="usage.html#overloadaggressively"><code>-overloadaggressively</code></a>.
621 <code>proguard/wtk/default.pro</code> that's inside the
622 <code>proguard.jar</code>.</dd>
629 href="usage.html#useuniqueclassmembernames"><code>-useuniqueclassmembernames</code></a>
634 href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
642 <dd>If your code contains empty busy-waiting loops, ProGuard's optimization
647 without further synchronization as <code>volatile</code>. If this is not
649 <a href="usage.html#dontoptimize"><code>-dontoptimize</code></a>
672 <dd>You are probably compiling or running some code that has been obfuscated
674 href="usage.html#overloadaggressively"><code>-overloadaggressively</code></a>
676 <code>sun.tools.java.MethodSet.add</code> in Sun's JDK 1.2.2, which is
681 <dd>You are probably processing some code that has been obfuscated before with
683 href="usage.html#overloadaggressively"><code>-overloadaggressively</code></a>
689 <dd>If you are keeping the <code>LocalVariableTable</code> or
690 <code>LocalVariableTypeTable</code> attributes, ProGuard's optimizing step
715 using the <a href="usage.html#dontoptimize"><code>-dontoptimize</code></a>