title: How to run app in Android Studio with shared library-module from other project?
body: <p>I use a self-written library-module within another project like it was suggested in </p>
  
  <p><a href="https://code.google.com/p/android/issues/detail?id=105570" rel="nofollow noreferrer">https://code.google.com/p/android/issues/detail?id=105570</a></p>
  
  <p>and</p>
  
  <p><a href="https://stackoverflow.com/questions/24658422/android-studio-0-8-1-creating-modules-without-copying-files">Android Studio 0.8.1 Creating Modules without copying files?</a></p>
  
  <p>I added the lines to settings.gradle and furthermore added the included library via "Project Structure"-Dialog as a dependency to the project. I use Android Studio 1.2.2.</p>
  
  <p>Everything within the IDE looks fine (imports are working, library-code can be browsed and edited, both modules can be "maked" without errors), but I can't seem to launch the project on my phone / emulator.</p>
  
  <p>I get a "classNotFoundException" for the first class from the library that is used in the app.</p>
  
  <p>I copy-pasted the entire project class by class from Eclipse where it would run without problems.</p>
  
  <p>What do I have to do to get the compiled classes of the library into my app onto my phone? </p>
  
  <p><strong>settings.gradle</strong></p>
  
  <pre><code>include ':app'
  include ':Sudoku'
  project(':Sudoku').projectDir=new File('/../Libs/sudoku')
  </code></pre>
  
  <p><strong>build.gradle</strong> (app)</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.frozenmilkmeteoroids.sudokuapp"
          minSdkVersion 15
          targetSdkVersion 22
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      compile 'com.android.support:appcompat-v7:22.2.0'
      compile project(':Sudoku')
  }
  </code></pre>
  
  <p><strong>build.gradle</strong> (library)</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          minSdkVersion 15
          targetSdkVersion 22
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:22.2.0'
  }
  </code></pre>