g0dkar / qrcode-kotlin

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

Unable to compile my Android app with java.awt #2

Closed pvarry closed 2 years ago

pvarry commented 2 years ago

This issue is less important then #1, but I still reported to you.

Describe the bug

I got a very strange issue, I'm unable to compile my Android application with the lib. I got this compilation error :

e: xxx/QrCode.kt: (55, 37): Cannot access class 'java.awt.image.BufferedImage'. Check your module classpath for missing or conflicting dependencies
e: xxx/QrCode.kt: (55, 37): Cannot access class 'java.awt.Color'. Check your module classpath for missing or conflicting dependencies

I looked in my "gradles" files and compared to yours and I didn't found anything.

To Reproduce

1) I added the lib on my project

2) Write the flowing code :

QRCode("20333 ").render()

3) Compile the project

Additional context

I search on Google and I found that java.awt is not compatible with Android. To temporarily fix this I created a custom render.

g0dkar commented 2 years ago

Heya! Thanks for reporting! I've checked with a friend and we've come up with alternatives for the java.awt package with Android.

I'll implement them soon!

mcanyucel commented 2 years ago

is this issue fixed? I still have the same issue for jwt.Color and jwt.Image.BufferedImage?

g0dkar commented 2 years ago

Heya @mcanyucel! It should have been fixed, which version of the lib are you using?

mcanyucel commented 2 years ago

Hey! thanks for the heads up; I was following https://androidrepo.com/repo/g0dkar-qrcode-kotlin-android-qrcode where the version is 1.1.0. Only after reading your message I remembered to check the version with github and realized the latest is 3.1.0.

Well, that's embarrassing. Thanks !

g0dkar commented 2 years ago

Hey, don't worry (been there many times before haha)! I'm happy to help! Let me know if you need help with anything else =D