Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter Errors #51

Open
jspizziri opened this issue Sep 21, 2022 · 1 comment
Open

Linter Errors #51

jspizziri opened this issue Sep 21, 2022 · 1 comment

Comments

@jspizziri
Copy link
Contributor

Running the following:

git clone [email protected]: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 %
@jspizziri
Copy link
Contributor Author

There's a temporary workaround for this for RNTP projects which is simply:

git clone [email protected]:doublesymmetry/KotlinAudio.git
cd KotlinAudio
./gradlew publishToMavenLocal

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

No branches or pull requests

1 participant