1 page.title=ProGuard 2 parent.title=Tools 3 parent.link=index.html 4 page.type= 5 @jd:body 6 7 <div id="qv-wrapper"> 8 <div id="qv"> 9 <h2></h2> 10 11 <ol> 12 <li><a href="#enabling"> ProGuard</a></li> 13 14 <li><a href="#configuring"> ProGuard</a></li> 15 16 <li> 17 <a href="#decoding"></a> 18 19 <ol> 20 <li><a href="#considerations"></a></li> 21 </ol> 22 </li> 23 </ol> 24 25 <h2></h2> 26 27 <ol> 28 <li> 29 <a href="http://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/introduction.html">ProGuard </a> 30 </li> 31 <li> 32 <a href="http://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/retrace/introduction.html">ProGuard ReTrace </a> 33 </li> 34 </ol> 35 </div> 36 </div> 37 38 <p>ProGuard <code>.apk</code> ProGuard <a href="{@docRoot}google/play/licensing/index.html"></a></p> 39 40 <p>ProGuard Android ProGuard ProGuard </p> 41 42 <p> ProGuard <code>retrace</code> </p> 43 44 <h2 id="enabling"> ProGuard</h2> 45 46 <p> Android <code>proguard.cfg</code> ProGuard <a href="#configuring"> ProGuard</a> ProGuard </p> 47 48 <p> ProGuard Ant Eclipse <code><project_root>/project.properties</code> <code>proguard.config</code> </p> 49 50 <p class="note"><strong></strong> Android Studio Proguard <code>gradle.build</code> <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard">Gradle </a> 51 52 <p> <code>proguard.cfg</code> </p> 53 <pre class="no-pretty-print"> 54 proguard.config=proguard.cfg 55 </pre> 56 <p> 57 58 </p> 59 <pre class="no-pretty-print"> 60 proguard.config=/path/to/proguard.cfg 61 </pre> 62 63 64 <p> <code>ant release</code> Eclipse <code>proguard.config</code> <em></em>ProGuard <code>.apk</code> ProGuard</p> 65 66 <p>ProGuard </p> 67 68 <dl> 69 <dt><code>dump.txt</code></dt> 70 <dd> <code>.apk</code> </dd> 71 72 <dt><code>mapping.txt</code></dt> 73 <dd><a href="#decoding"></a></dd> 74 75 <dt><code>seeds.txt</code></dt> 76 <dd></dd> 77 78 <dt><code>usage.txt</code></dt> 79 <dd> <code>.apk</code> </dd> 80 </dl> 81 82 <p></p> 83 84 <ul> 85 <li><code><project_root>/bin/proguard</code> Ant</li> 86 87 <li><code><project_root>/proguard</code> Eclipse</li> 88 </ul> 89 90 91 <p class="caution"><strong></strong> ProGuard <a href="#considerations"></a> 92 </p> 93 94 <h2 id="configuring"> ProGuard</h2> 95 96 <p><code>proguard.cfg</code> ProGuard </p> 97 98 <ul> 99 <li> <code>AndroidManifest.xml</code> </li> 100 101 <li> JNI </li> 102 103 <li></li> 104 </ul> 105 106 <p> <code>proguard.cfg</code> <code>ClassNotFoundException</code> ProGuard </p> 107 108 <p> <code>proguard.cfg</code> <code>-keep</code> ProGuard </p> 109 <pre> 110 -keep public class <MyClass> 111 </pre> 112 113 <p> <code>-keep</code> <a href="http://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/introduction.html">ProGuard </a>Keep <em></em><em></em><a href="http://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/troubleshooting.html"></a> ProGuard </p> 114 115 <h2 id="decoding"></h2> 116 117 <p>ProGuard <code><project_root>/bin/proguard/mapping.txt</code> </p> 118 119 <p>Windows <code>retrace.bat</code> Linux Mac OS X <code>retrace.sh</code> <code><sdk_root>/tools/proguard/</code> <code>retrace</code> </p> 120 <pre>retrace.bat|retrace.sh [-verbose] mapping.txt [<stacktrace_file>]</pre> 121 <p></p> 122 123 <pre>retrace.bat -verbose mapping.txt obfuscated_trace.txt</pre> 124 125 <p><stacktrace_file><code>retrace</code> <em></em></p> 126 127 <h3 id="considerations"></h3> 128 129 <p> <code>mapping.txt</code> <code>mapping.txt</code> <code>mapping.txt</code> </p> 130 131 <p> ProGuard <code>mapping.txt</code> <code>mapping.txt</code> <code>mapping.txt</code> </p> 132 133 <p> <code>mapping.txt</code> </p> 134