title: Cannot include 3rd-party jars into Android application with the maven-android-plugin
body: <p>I am trying to use the samples provided, but when I add another jar that I already created with POJO's, I am not able to compile the application anymore</p>
  
  <pre><code>            &lt;plugin&gt;
                  &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-android-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;sdk&gt;
                          &lt;platform&gt;9&lt;/platform&gt;
                      &lt;/sdk&gt;
                      &lt;emulator&gt;
                          &lt;avd&gt;23&lt;/avd&gt;
                          &lt;wait&gt;10000&lt;/wait&gt;
                          &lt;!--&lt;options&gt;-no-skin&lt;/options&gt;--&gt;
                      &lt;/emulator&gt;
                      &lt;zipalign&gt;
                          &lt;verbose&gt;true&lt;/verbose&gt;
                      &lt;/zipalign&gt;
                      &lt;deleteConflictingFiles&gt;true&lt;/deleteConflictingFiles&gt;
                      &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>When I use my jar I created, I get this OOM error</p>
  
  <pre><code>    [INFO] solution is to recompile the class from source, using an up-to-date compiler
      [INFO] and without specifying any "-target" type options. The consequence of ignoring
      [INFO] this warning is that reflective operations on this class will incorrectly
      [INFO] indicate that it is *not* an inner class.
      [INFO]
      [INFO] UNEXPECTED TOP-LEVEL ERROR:
      [INFO] java.lang.OutOfMemoryError: Java heap space
      [INFO]  at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:153)
      [INFO]  at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
      [INFO]  at com.android.dx.dex.code.RopTranslator.pickOrder(RopTranslator.java:345)
      [INFO]  at com.android.dx.dex.code.RopTranslator.translateAndGetResult(RopTranslator.java:205)
      [INFO]  at com.android.dx.dex.code.RopTranslator.translate(RopTranslator.java:102)
      [INFO]  at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:289)
      [INFO]  at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
      [INFO]  at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
      [INFO]  at com.android.dx.command.dexer.Main.processClass(Main.java:369)
      [INFO]  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
      [INFO]  at com.android.dx.command.dexer.Main.access$400(Main.java:59)
      [INFO]  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:134)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
      [INFO]  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
      [INFO]  at com.android.dx.command.dexer.Main.processOne(Main.java:313)
      [INFO]  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
      [INFO]  at com.android.dx.command.dexer.Main.run(Main.java:185)
      [INFO]  at com.android.dx.command.dexer.Main.main(Main.java:166)
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] Chapter 06: Mobile Device Parent .................. SUCCESS [0.359s]
      [INFO] Chapter 06: Mobile Device Application ............. FAILURE [1:27.859s]
  </code></pre>
  
  <p>I even tried upping the memory</p>
  
  <pre><code> set JAVA_OPTS="%JAVA_OPTS% -Xmx512m -XX:MaxPermSize=768m"
  </code></pre>
  
  <p>But still ran out for some reason.</p>
  
  <p>Now, when I try to use another jar from someone else, say Crest which states it works out-of-the-box with android:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.codegist.crest&lt;/groupId&gt;
          &lt;artifactId&gt;codegist-crest&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I then try to build and get this error:</p>
  
  <pre><code>    [INFO] trouble processing "javax/xml/bind/annotation/adapters/CollapsedStringAdapter.class":
      [INFO]
      [INFO] Ill-advised or mistaken usage of a core class (java.* or javax.*)
      [INFO] when not building a core library.
      [INFO]
      ...
      [INFO] If you are legitimately using some code that happens to be in a
      [INFO] core package, then the easiest safe alternative you have is to
      [INFO] repackage that code. That is, move the classes in question into
      [INFO] your own package namespace. This means that they will never be in
      [INFO] conflict with core system classes. JarJar is a tool that may help
      [INFO] you in this endeavor. If you find that you cannot do this, then
      [INFO] that is an indication that the path you are on will ultimately
      [INFO] lead to pain, suffering, grief, and lamentation.
  </code></pre>
  
  <p>So </p>
  
  <ol>
  <li><p>how do I determine what classes I am able to use with an android application?</p></li>
  <li><p>How do I structure a common domain jar that </p></li>
  </ol>