title: Proguard and Android :(
body: <p>I am trying to run Proguard on my Android app and running into issues. </p>
  
  <p>I am using SpongyCastle jar (copy and past of full bouncy castle with package renamed so it does not conflict with androids bouncy castle built in version)</p>
  
  <p>When running proguard I see the following </p>
  
  <p>How do I fix this? Add rt.jar to my libs?</p>
  
  <p>The whole point of proguard is to shrink the code, but I keep adding jars to get around these issues where proguard complains it cannot find a class! Am I missing something?</p>
  
  <pre><code>[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException
  [proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
  [proguard] Note: the configuration refers to the unknown class 'android.app.backup.BackupAgentHelper'
  [proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
  [proguard] Note: there were 2 references to unknown classes.
  [proguard]       You should check your configuration for typos.
  [proguard] Warning: there were 57 unresolved references to classes or interfaces.
  [proguard]          You may need to specify additional library jars (using '-libraryjars'),
  [proguard]          or perhaps the '-dontskipnonpubliclibraryclasses' option.
  
  UILD FAILED
  :\AndroidSDK\android-sdk_r12-windows\android-sdk-windows\tools\ant\build.xml:713: Please correct the above warnings first.
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <pre><code>ANT Script
  </code></pre>
  
  <p>I used <code>android update project --path .</code> to generate the build.xml as the project was created sometime ago and I haven't made any changes</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project name="RootActivity" default="help"&gt;
          &lt;loadproperties srcFile="local.properties" /&gt;
          &lt;property file="ant.properties" /&gt;
          &lt;loadproperties srcFile="project.properties" /&gt;
          &lt;fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" unless="sdk.dir" /&gt;
          &lt;import file="${sdk.dir}/tools/ant/build.xml" /&gt;
      &lt;/project&gt;
  </code></pre>