g0dkar / qrcode-kotlin

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

some typos in installation and usage guide (alguns erros de Digitação nos guias de instalação e uso) #116

Open t0in4 opened 8 months ago

t0in4 commented 8 months ago

Describe the bug A clear and concise description of what the bug is. From https://github.com/g0dkar/qrcode-kotlin In installation: Screenshot from 2024-01-13 20-47-37

Repo qrcode-kotline:4.1.1 not found Execution failed for task ':compileKotlin'.

Could not resolve all files for configuration ':compileClasspath'. Could not find io.github.g0dkar:qrcode-kotlin:4.1.1. Searched in the following locations: https://repo.maven.apache.org/maven2/io/github/g0dkar/qrcode-kotlin/4.1.1/qrcode-kotlin-4.1.1.pom

In usage: Screenshot from 2024-01-13 20-46-47

val pngBytes = helloWorld.render() // return error None of the following functions can be called with the arguments supplied. write(ByteArray!) defined in java.io.FileOutputStream write(Int) defined in java.io.FileOutputStream

All issues was solved by changing : Todos os problemas foram resolvidos alterando

  1. // Use this for both Android and JVM implementation("io.github.g0dkar:qrcode-kotlin:4.1.1")

To

implementation("io.github.g0dkar:qrcode-kotlin:4.1.0")

  1. // By default, QRCodes are rendered as PNGs. val pngBytes = helloWorld.render() FileOutputStream("hello-world.png").use { it.write(pngBytes) }

To

// By default, QRCodes are rendered as PNGs. val pngBytes = helloWorld.renderToBytes() FileOutputStream("hello-world.png").use { it.write(pngBytes) }

g0dkar commented 8 months ago

Heya! Thanks for the report! I had some issues with the release process but this should be fixed soon 😅

Gametz commented 8 months ago

I have the same problem.

This way fixed to me:

.render() --> .renderToBytes()

g0dkar commented 8 months ago

Heya, finally found out what was going wrong with the deployment. The 4.1.1 version should be up soon!

Sorry for the delay, I had COVID and wasn't feeling well at all x_x

Let me know if you can access the 4.1.1 version and if it solves the issues :)