question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during task 'extractDebugAnnotations'

See original GitHub issue

I’m receiving the following error during our gradle ‘assembleDebug’ task, when it gets to ‘extractDebugAnnotations’

OpenTreeMap/src/org/azavea/otm/data/PendingEditDescription.java:45: '<>' operator is not allowed for source level below 1.7

The file is sometimes different, but it always has to do with a Java-6 incompatability, even though we have the source and target level set to 1.8.

Our gradle configurations are as follows: Top level:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.+'
        classpath 'me.tatarka:gradle-retrolambda:2.1.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

Main project:

apply plugin: 'com.android.application'

dependencies {
    compile project(':OpenTreeMap')
}

android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Library project (Where the majority of our code/resources live):

apply plugin: 'com.android.library'
apply plugin: 'retrolambda'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile 'com.google.android.gms:play-services:5.0.+'
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'org.jdeferred:jdeferred-android-aar:1.2.1'
    compile 'com.google.guava:guava:17.0'
}

android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Is there something I’m doing wrong?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tianzhijiexiancommented, Jul 8, 2015

add apply plugin: ‘me.tatarka.retrolambda’ to all your module

0reactions
hamberluocommented, Oct 28, 2015

@evant i am using gradle-retrolambda in a library project. how to solve that issue? app seems work well with doing nothing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gradle - Android aar's have stopped building with ...
Android aar's have stopped building with extractDebugAnnotations ... The error was the following: Execution failed for task ...
Read more >
Fix "Execution Failed for task :app ... - GeeksforGeeks
Working on some important java project with Java code involved, and just when you hit that Build hammer icon, you get this: Error:Execution...
Read more >
[Solved]-Execution failed for task - Flutter - appsloveworld
Coding example for the question Execution failed for task ':path_provider:extractDebugAnnotations'-Flutter.
Read more >
SubScene build error in Android - Unity Forum
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > java.lang.OutOfMemoryError (no error ...
Read more >
Error Execution failed for task app ... - YouTube
its a firebase notification and follow this short video and it can help you to fix it fast!thank you1. Error : Execution failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found