title: Create library for Android development?
body: <p>I'm pretty new to Android development, but I  have some experience with Java and Eclipse. I'm looking for ways to create re-usable libraries (controls, helpers, "standard" activities, etc.) that I could use in my own projects, but that could also be distributed to other developers without disclosing the source code.</p>
  
  <p>Normally, I'd package the class files into a JAR file and any other developer could add it to the classpath and use the packaged classes.</p>
  
  <p>How can I do that with Android projects? I've read about Android Library Projects, but as the documentation states they can not be packaged into a JAR, but will be compiled along with the project that references the library project. This means I also have to distribute the source code.</p>
  
  <p>I've also read <a href="https://stackoverflow.com/questions/3252552/differences-between-jar-android-library-and-android-library-project">this post</a>, which asks about the same question but didn't provide a satisfying answer.</p>
  
  <p>So: Is there a way of compiling and packaging a set of classes and other files (including XML layouts, resources and stuff) and distribute only that package without any source codes so that it can be "referenced" and used like a JAR file by any other developer?</p>