picker
picker copied to clipboard
Error while ./gradlew build
Task :react-native-picker_picker:lint FAILED Ran lint on variant debug: 4 issues found Ran lint on variant release: 4 issues found Wrote HTML report to file:///home/adityabohra/Documents/Dev/TestReact/AwesomeProject/node_modules/@react-native-picker/picker/android/build/reports/lint-results.html Wrote XML report to file:///home/adityabohra/Documents/Dev/TestReact/AwesomeProject/node_modules/@react-native-picker/picker/android/build/reports/lint-results.xml
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':react-native-picker_picker: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:
/home/adityabohra/Documents/Dev/TestReact/AwesomeProject/node_modules/@react-native-picker/picker/android/src/main/java/com/reactnativecommunity/picker/CheckedTextViewImpl.java:7: Error: This custom view should extend androidx.appcompat.widget.AppCompatCheckedTextView instead [AppCompatCustomView] public class CheckedTextViewImpl extends CheckedTextView { ~~~~~~~~~~~~~~~ /home/adityabohra/Documents/Dev/TestReact/AwesomeProject/node_modules/@react-native-picker/picker/android/src/main/java/com/reactnativecommunity/picker/TextViewImpl.java:7: Error: This custom view should extend androidx.appcompat.widget.AppCompatTextView instead [AppCompatCustomView] public class TextViewImpl extends TextView { ~~~~~~~~
got the same error on android when pack, wait to be fixed.
Facing the same issue. Any workaround??
Same
How to reproduce from scratch:
npx react-native init testpicker --template react-native-template-typescript --npm
npm install --save @react-native-picker/picker
cd android
./gradlew build
Result:
> Task :react-native-picker_picker:lint FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-picker_picker: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:
/private/tmp/testpicker/node_modules/@react-native-picker/picker/android/src/main/java/com/reactnativecommunity/picker/CheckedTextViewImpl.java:7: Error: This custom view should extend androidx.appcompat.widget.AppCompatCheckedTextView instead [AppCompatCustomView]
public class CheckedTextViewImpl extends CheckedTextView {
~~~~~~~~~~~~~~~
/private/tmp/testpicker/node_modules/@react-native-picker/picker/android/src/main/java/com/reactnativecommunity/picker/TextViewImpl.java:7: Error: This custom view should extend androidx.appcompat.widget.AppCompatTextView instead [AppCompatCustomView]
public class TextViewImpl extends TextView {
~~~~~~~~
Seems like this will pass lint stage
allprojects {
...
afterEvaluate {
if (getPlugins().hasPlugin('android') ||
getPlugins().hasPlugin('android-library')) {
configure(android.lintOptions) {
abortOnError false
checkReleaseBuilds false
}
}
}
}
any update? I get OP's exact same error
I am also facing this issue? Any update?
i am also have error while build apk
any progress on this issue please ? facing the same problem from my side
afterEvaluate { if (getPlugins().hasPlugin('android') || getPlugins().hasPlugin('android-library')) { configure(android.lintOptions) { abortOnError false checkReleaseBuilds false } } }
This fixed my issue