Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Java 8 not supported #6

Closed
fschoellhammer opened this issue Oct 10, 2014 · 1 comment
Closed

Java 8 not supported #6

fschoellhammer opened this issue Oct 10, 2014 · 1 comment
Labels

Comments

@fschoellhammer
Copy link

I have a simple project using retrolambda, but after I integrate aspectJ, it fails with:

Error:Execution failed for task ':app:compileDebugAspectj'.

The type java.lang.invoke.MethodHandles cannot be resolved. It is indirectly referenced from required .class files

My gradle build file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'me.tatarka:gradle-retrolambda:2.3.1'
        classpath 'com.uphyca.gradle:gradle-android-aspectj-plugin:0.9.7'
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "user.com.myapplication"
        minSdkVersion 15
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility org.gradle.api.JavaVersion.VERSION_1_8
        targetCompatibility org.gradle.api.JavaVersion.VERSION_1_8
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

apply plugin: 'retrolambda'

retrolambda {
    jdk System.getenv("JAVA8_HOME")
    oldJdk System.getenv("JAVA7_HOME")
}

apply plugin: 'android-aspectj'

I tried to set it up manually, using the gradle script in http://fernandocejas.com/2014/08/03/aspect-oriented-programming-in-android/ and that seems to work.

@esmasui
Copy link
Member

esmasui commented Oct 14, 2014

We don't support Java 8 at this time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants