title: Lambda expression in Android Library Module not working
body: <p>I had an android app module which used jdk 8 and enabled Jack Options. Then I convert it to an Android Library module. And then I have to remove Jack Options from build gradle. And now the Lambda expression gives me below error when I try to build the AAR file. </p>
  
  <pre><code>Error:(59, 25) error: cannot find symbol method metafactory(Lookup,String,MethodType,MethodType,MethodHandle,MethodType)
  </code></pre>
  
  <p>The code giving this error is,</p>
  
  <pre><code>Runnable r= () -&gt; {
        appManager.startApp(definition,identifier);
  };
  </code></pre>
  
  <p>My Build Gradle is </p>
  
  <pre><code>Apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 26
      buildToolsVersion "26.0.0"
      defaultConfig {
          minSdkVersion 18
          targetSdkVersion 26
          versionCode 1
          versionName "1.0"
  
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  
  compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
  }
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:26.+'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      testCompile 'junit:junit:4.12'
  }
  </code></pre>
  
  <p>What is the reason for this problem?</p>