Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing ProGuard with Android
    primarykey
    data
    text
    <p>I have problems dealing with ProGuard and Android.</p> <p>I searched on the web for hours and found multiple ways to obsfuscate an Android application. For now I'm trying one that looks to be the easiest, so :</p> <blockquote> <ul> <li>I created a <code>config.cfg</code> file in the root directory of my project</li> <li>I added <code>proguard.config=config.cfg</code> in my <code>project.properties</code></li> <li>The I used the Eclipse export wizard to export &amp; sign the .apk file</li> </ul> </blockquote> <p>I got a message saying <code>Proguard returned with error code 1. See console</code> and in the console:<br /></p> <pre><code>Proguard returned with error code 1. See console Note: there were 3847 duplicate class definitions. Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry You should check if you need to specify additional program jars. Warning: there were 4 unresolved references to classes or interfaces. You may need to specify additional library jars (using '-libraryjars'). Error: Please correct the above warnings first. </code></pre> <p>Even if I use the config provided by the official Proguard website, or the default one I have errors.<br /> Here is my custom config (myProject/config.cfg):</p> <pre><code>-injars bin/classes -injars libs -libraryjars "C:\Program Files\Android\android-sdk\platforms\android-13\android.jar" -dontskipnonpubliclibraryclasses -optimizationpasses 5 -printmapping map.txt -flattenpackagehierarchy -dontpreverify -repackageclasses '' -allowaccessmodification -optimizations !code/simplification/arithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public &lt;init&gt;(android.content.Context); public &lt;init&gt;(android.content.Context, android.util.AttributeSet); public &lt;init&gt;(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclasseswithmembers class * { public &lt;init&gt;(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public &lt;init&gt;(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Parcelable { static android.os.Parcelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static &lt;fields&gt;; } </code></pre> <p>I can't get it to work... any idea would be greatly appreciated !<br /><br /> <strong>NOTE :</strong> I use the Jackson JSON librairies that are stored in the <code>libs</code> folder of my project</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload