g0dkar / qrcode-kotlin

QRCode Generator implemented in pure Kotlin
https://qrcodekotlin.com/
MIT License
192 stars 20 forks source link

`BufferedImage` class not found #108

Closed hueachilles closed 11 months ago

hueachilles commented 11 months ago

Describe the bug I'm looking to use this library in my app but am encountering this error when generating QR codes

FATAL EXCEPTION: main
Process: , PID: 30803
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/image/BufferedImage;
at qrcode.render.QRCodeGraphics.createImage(QRCodeGraphics.jvm.kt:27)
at qrcode.render.QRCodeGraphics.createImage$default(QRCodeGraphics.jvm.kt:25)
at qrcode.render.QRCodeGraphics.createGraphics(QRCodeGraphics.jvm.kt:33)
at qrcode.render.QRCodeGraphics.draw(QRCodeGraphics.jvm.kt:41)
at qrcode.render.QRCodeGraphics.draw$default(QRCodeGraphics.jvm.kt:39)
at qrcode.render.QRCodeGraphics.fillRect(QRCodeGraphics.jvm.kt:130)
at qrcode.render.QRCodeGraphics.fill(QRCodeGraphics.jvm.kt:135)
at qrcode.shape.DefaultShapeFunction.renderSquare(DefaultShapeFunction.kt:34)
at qrcode.QRCode$draw$1.invoke(QRCode.kt:140)
at qrcode.QRCode$draw$1.invoke(QRCode.kt:121)...

To Reproduce I'm able to run the sample app in this repo no issue. I'm able to generate QR codes after creating an empty project and copying files over. I'm unable to generate QR codes from an existing project.

Anyone have suggestions on how to troubleshoot error for an existing app?

Expected behavior

QR codes should be generated from the existing app like it is generated in the sample or empty project app.

Screenshots or other QRCodes rendered with other tools

Additional context

hueachilles commented 11 months ago

Nevermind. I haven't found the root of the problem but it's not likely worth anyone's time to figure this out.