:react-native-image-marker:compileDebugKotlin FAILED
Describe the bug A clear and concise description of what the bug is. :react-native-image-marker:compileDebugKotlin FAILED
To Reproduce Steps to reproduce the behavior: Run for Android
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Devlopment environment(please complete the following information):
- OS: M4
- nodejs: v23.7.0
- react-native: 0.77.0
- react-native-image-marker : 1.2.6
Smartphone (please complete the following information):
- Device: Real Device android 13, Emulator android 14
- OS: Android
Additional context nothing
The same issue is faced.
Facing the same issue on react-native: "0.77.0"
I have a solution but temp.
Open Android Studio open Library -> react-native-image-marker -> kotlin+java -> com.jimmydaddy.imagemarker -> base -> MarkTextOptions line number 15 watermarkTexts[i] = TextOptions(textMap) ->watermarkTexts[i] = textMap?.let { TextOptions(it) }
then run your build it's working
@JimmyDaddy please update MarkTextOptions file error is null check
Thanks
I have a solution but temp.
Open Android Studio open Library -> react-native-image-marker -> kotlin+java -> com.jimmydaddy.imagemarker -> base -> MarkTextOptions line number 15 watermarkTexts[i] = TextOptions(textMap) ->watermarkTexts[i] = textMap?.let { TextOptions(it) }
then run your build it's working
@JimmyDaddy please update MarkTextOptions file error is null check
Thanks
![]()
This fixed it for me. Patched it.
Can this small change be merged please?
I prepared a patch if anyone would like it.
package.json { "scripts": { "postinstall": "patch-package" } }
create patch file .\patches\react-native-image-marker+1.2.6.patch
and this is content of "react-native-image-marker+1.2.6.patch"
diff --git a/node_modules/react-native-image-marker/android/src/main/java/com/jimmydaddy/imagemarker/base/MarkTextOptions.kt b/node_modules/react-native-image-marker/android/src/main/java/com/jimmydaddy/imagemarker/base/MarkTextOptions.kt
index 31b3043..7393c47 100644
--- a/node_modules/react-native-image-marker/android/src/main/java/com/jimmydaddy/imagemarker/base/MarkTextOptions.kt
+++ b/node_modules/react-native-image-marker/android/src/main/java/com/jimmydaddy/imagemarker/base/MarkTextOptions.kt
@@ -12,7 +12,7 @@ class MarkTextOptions(options: ReadableMap) : Options(options) {
watermarkTexts = arrayOfNulls(waterMarkTextsMap.size())
for (i in 0 until waterMarkTextsMap.size()) {
val textMap = waterMarkTextsMap.getMap(i)
- watermarkTexts[i] = TextOptions(textMap)
+ watermarkTexts[i] = textMap?.let { TextOptions(it) }
}
}
}
fixed by #248