Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

android - Execution failed for task ':app:runCheckstyle'

After Implementing Huawei Ads Into My App I Am Facing The Following Error Execution failed for task ':app:runCheckstyle'.

Checkstyle rule violations were found. See the report at: file:///Users/mac/Downloads/youtube%20video%20downloader/app/build/reports/checkstyle/runCheckstyle.html Checkstyle files with violations: 6 Checkstyle violations by severity: [error:14, warning:8]

Here is complete Error List :

Executing tasks: [clean, :app:assembleDebug] in project /Users/mac/Downloads/youtube video downloader

Configure project :app Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

Task :app:clean Task :app:formatKtlint Task :app:preBuild UP-TO-DATE

Task :app:runCheckstyle [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:1: File does not end with a newline. [NewlineAtEndOfFile] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:126:15: '=' is not followed by whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:128:30: '=' is not followed by whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:128:30: '=' is not preceded with whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:129:36: '=' is not followed by whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:129:36: '=' is not preceded with whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:182:20: Variable 'bannerView' should be declared final. [FinalLocalVariable] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:185:17: Variable 'adParam' should be declared final. [FinalLocalVariable] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:198:17: Variable 'adParam' should be declared final. [FinalLocalVariable] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:205:9: 'if' is not followed by whitespace. [WhitespaceAfter] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:205:17: '%' is not followed by whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:205:17: '%' is not preceded with whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:205:19: '==' is not followed by whitespace. [WhitespaceAround] [ant:checkstyle] [ERROR] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/MainActivity.java:205:19: '==' is not preceded with whitespace. [WhitespaceAround] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamStateEntity.java:72:5: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java:504:5: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java:114:5: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java:360:9: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java:434:9: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java:579:9: Definition of 'equals()' without corresponding definition of 'hashCode()'. [EqualsHashCode] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java:145:5: Method length is 259 lines (max allowed is 150). [MethodLength] [ant:checkstyle] [WARN] /Users/mac/Downloads/youtube video downloader/app/src/main/java/org/schabi/newpipe/streams/WebMWriter.java:124:5: Method length is 206 lines (max allowed is 150). [MethodLength]

Task :app:runCheckstyle FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:runCheckstyle'.

Checkstyle rule violations were found. See the report at: file:///Users/mac/Downloads/youtube%20video%20downloader/app/build/reports/checkstyle/runCheckstyle.html Checkstyle files with violations: 6 Checkstyle violations by severity: [error:14, warning:8]

  • 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 24s 3 actionable tasks: 3 executed


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...