input-samples
input-samples copied to clipboard
BasicGestureDetect: Task :Application:lint FAILED: This custom view should extend android.support.v7.widget.AppCompatTextView instead [AppCompatCustomView]
Mac-mini:BasicGestureDetect anka$ java -version
openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
Mac-mini:BasicGestureDetect anka$ ./gradlew check
> Task :Application:lint FAILED
Ran lint on variant debug: 18 issues found
Ran lint on variant release: 18 issues found
Wrote HTML report to file:///Users/anka/AndroidStudioProjects/BasicGestureDetect/Application/build/reports/lint-results.html
Wrote XML report to file:///Users/anka/AndroidStudioProjects/BasicGestureDetect/Application/build/reports/lint-results.xml
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Application:lint'.
> 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
}
}
...
Errors found:
/Users/anka/AndroidStudioProjects/BasicGestureDetect/Application/src/main/java/com/example/android/common/logger/LogView.java:25: Error: This custom view should extend android.support.v7.widget.AppCompatTextView instead [AppCompatCustomView]
public class LogView extends TextView implements LogNode {
~~~~~~~~
* 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 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 14s
24 actionable tasks: 1 executed, 23 up-to-date
Modified logger/LogView public class LogView extends TextView implements LogNode { to public class LogView extends androidx.appcompat.widget.AppCompatTextView implements LogNode { and it's fine now.