Closed ronlobo01 closed 1 year ago
Please try version 3.0.0-alpha3. It still needs some testing but should work.
I'm also having this issue - @ronlobo01 were you able to fix it?
@vitorclelis96 have you tried v.3.0.0-alpha3?
Hey @stephenkopylov Thank you for the reply - I have 'patch-packaged' it and my build worked:
diff --git a/node_modules/react-native-hole-view/android/src/main/java/com/ibitcy/react_native_hole_view/RNHoleView.kt b/node_modules/react-native-hole-view/android/src/main/java/com/ibitcy/react_native_hole_view/RNHoleView.kt
index 03347d4..ec18da3 100644
--- a/node_modules/react-native-hole-view/android/src/main/java/com/ibitcy/react_native_hole_view/RNHoleView.kt
+++ b/node_modules/react-native-hole-view/android/src/main/java/com/ibitcy/react_native_hole_view/RNHoleView.kt
@@ -176,14 +176,14 @@ class RNHoleView(context: Context) : ReactViewGroup(context) {
mHoles.addAll(holes)
}
- override fun onDraw(canvas: Canvas?) {
+ override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
if (mHolesPath != null) {
canvas?.drawPath(mHolesPath!!, mHolesPaint)
}
}
- override fun dispatchDraw(canvas: Canvas?) {
+ override fun dispatchDraw(canvas: Canvas) {
super.dispatchDraw(canvas)
if (mHolesPath != null) {
canvas?.drawPath(mHolesPath!!, mHolesPaint)
Closing because of inactivity
Getting the following errors while generating the Android build
> Task :react-native-hole-view:compileReleaseKotlin FAILED
'onDraw' overrides nothing
is Canvas? but Canvas was expected
'dispatchDraw' overrides nothing
Type mismatch: inferred type is Canvas? but Canvas was expected
Need some help!