Skip to content

Linter Errors #51

Description

@jspizziri

Running the following:

git clone git@github.com:doublesymmetry/KotlinAudio.git
cd KotlinAudio
./gradlew -x test build publishToMavenLocal

Results in a linter error:

Task :kotlin-audio:lintDebug FAILED
Wrote HTML report to file:///Users/gav/Repos/KotlinAudio/kotlin-audio/build/reports/lint-results-debug.html
Lint found 3 errors and 9 warnings. First failure:
/Users/gav/Repos/KotlinAudio/kotlin-audio/src/main/java/com/doublesymmetry/kotlinaudio/notification/NotificationManager.kt:159: Error: Call requires API level 24 (current min is 21): java.lang.Iterable#forEach [NewApi]
                config.buttons.forEach { button ->
                               ~~~~~~~

Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:

...
android {
    lintOptions {
        abortOnError false
    }
}
...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kotlin-audio:lintDebug'.
> A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintTask$AndroidLintLauncherWorkAction
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintWorkAction
> Lint found errors in the project; aborting build.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 11s
142 actionable tasks: 142 executed
gav@gavs-mbp KotlinAudio %

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions