title: Adding android.jar as a dependency for a module in Android Studio
body: <p>I have decided to ask the question after my research did not reveal any useful solutions for my scenario which I believe should be quite popular.</p>
  
  <p>My question is slightly related to this <a href="https://stackoverflow.com/questions/28154681/android-studio-java-library-module-vs-android-library-module/28155942?noredirect=1#comment52222797_28155942">SO question</a>, but the solution did not help in my scenario.</p>
  
  <p>I want to create a Java module that will contain only my application logic. That said, I do not want it to be an Android Library module. I do not need to have manifest files and others for such a library. There will not be any Android activities in my application logic Java module. All Android-specific code will be in the Android module (called <em>app</em>). My Java module is called <em>applogic</em>.</p>
  
  <p>So technically, I want my project to look like</p>
  
  <pre><code>AppProjectName
  |--&gt;app //Only Android-specific code here
     |
     --&gt;src
  |--&gt;applogic //General, reusable Java-code here
     |
     --&gt;src
  </code></pre>
  
  <p>In the <em>app</em> module settings, I add <em>applogic</em> as a module dependency.
  From my Android <em>app</em>, I create objects defined in classes in <em>applogic</em>. I am able to do that easily.</p>
  
  <p>And here is the thing. I want to use Android's logging capabilities (in <code>android.util.Log</code>). How can I use that for my Java library?</p>
  
  <p>A possible solution that was stated in the SO question mentioned above was to add <code>android.jar</code> as a library to my <code>applogic</code> module. I was not able to do that in Android Studio. Any guidance will be greatly helpful.</p>
  
  <p>Thanks!</p>