title: Android Libraries in Android Studio
body: <p>Has anyone figured/found out how Android libraries are intended to work in Android studio?</p>
  
  <p>I have not been able to find any documentation on this yet (the documentation on the Android Developer Site is incredibly bare-boned), and I observe that depending on how I create the library project, I get completely different results.</p>
  
  <p>If I import a library from Eclipse (following the recommendations on the website to export to Gradle first) I end up with a new project + module containing the library project. This does not seem quite right (an intellij project = eclipse workspace), and attempts to compile/make this in intellij results in many errors (the library project can't find the android support libraries).</p>
  
  <p>If I create a new project from scratch with a library module, then I get an android library project with a build.gradle file.</p>
  
  <p>If I create a new module from within a project (using right click on the project), then I get an Android library built using Ant. This compiles fine, but seems very odd. Surely it is not intended that we should use Ant for Android libraries in android Studio? Creating a new library module using File > New Module doesn't seem to work, incidentally. It just creates a new application instead.</p>
  
  <p>Has anyone picked up any information to make sense of this? I also haven't found any location where one can specify which libraries should be used in which application modules. I understand this is a preview release, but I'm having difficulty believing that a core feature like Android libraries is so poorly supported. What am I missing?</p>
  
  <p>Update 2014-04-09:</p>
  
  <p>So I took a new round with Android Studio this week. And while the problems now are different than when I originally wrote this, this is - quite incredibly - still a big problem. I've still not found a good explanation of using Android libraries in multiple projects in AS (including nested libs). Some of the suggestions I've seen recommend copying code into multiple locations - which completely defeats the purpose of having a library to begin with. </p>
  
  <p>I just don't get what Google are thinking with Android Studio... It's a pity, because it seems like a great tool, but the lack of an intuitive handling something so basic as code reuse is a big issue for me (never mind that coding specifically for Android is becoming less and less attractive, when compared to the ever-improving cross-platform development tools).</p>