title: Android Studio gradle access module classes from library module
body: <p>I have 2 modules in my Android Studio project. app and mupdf. </p>
  
  <p>App module plugin type is <strong>android</strong> and mupdf module plugin type is <strong>android-library</strong>. </p>
  
  <p>If I add to mupdf dependency to app module, I can access mupdf classes in my app module. </p>
  
  <p>But I need to access module classes in mupdf library module. But taking package doesn't exist error. build.gradle files are like that. </p>
  
  <p>Question is this: <strong>How can I access classes and methods from library module that is main module depends it ?</strong>  </p>
  
  <p><strong>app/build.gradle</strong></p>
  
  <pre><code>apply plugin: 'android'
  android {
      compileSdkVersion 19
      buildToolsVersion '19.0.0'
      defaultConfig {
          minSdkVersion 8
          targetSdkVersion 19
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  dependencies {
      compile 'com.android.support:appcompat-v7:+'
      compile 'com.j256.ormlite:ormlite-android:4.45@jar'
      compile 'com.j256.ormlite:ormlite-core:4.45@jar'
      compile files('*****/dd-plist.jar')
      compile files('*****/dd-plist.jar')
      compile project(':mupdf')
  }
  </code></pre>
  
  <p><strong>mupdf/build.gradle</strong></p>
  
  <pre><code>apply plugin: 'android-library'
  android {
      compileSdkVersion 19
      buildToolsVersion "19.0.0"
      defaultConfig {
          minSdkVersion 8
          targetSdkVersion 19
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['res']
              res.srcDirs = ['res']
          }
      }
  }
  dependencies {
      compile 'com.android.support:appcompat-v7:+'
      compile fileTree(dir: 'lib', include: '*.*')
  }
  </code></pre>