g0dkar / qrcode-kotlin Goto Github PK
View Code? Open in Web Editor NEWQRCode Generator implemented in pure Kotlin
Home Page: https://qrcodekotlin.com/
License: MIT License
QRCode Generator implemented in pure Kotlin
Home Page: https://qrcodekotlin.com/
License: MIT License
Describe the bug
Build file '/Users/fedmest/Projects/qrcode-kotlin/build.gradle.kts' line: 15
Plugin [id: 'com.android.library', artifact: 'com.android.tools.build:gradle:4.1.2'] was not found in any of the following sources:
To Reproduce
I also tried building the project from the command line with gradle
gradle build
Or any other way to support it without using Zxing.
Describe the bug
4.0.2-3
I'm updating a hobby project from v3.3.0 to 4.0.+ and it seems I am unable to render a QR code through Jetpack compose.
I am using landscapist as my image loading library and QR codes were working fine throughout v3, but now they are just blank solid colored squares moving to v4
I have tried using render()
, render("bmp")
, and renderToGraphics().nativeImage()
to no avail. nativeImage() was my working way last major version.
render() seems to actually produce an inner square but, and rounded only shows rounded corners along the right side.
Correction: Top left corner is square while the other corners show a rounded corner
To Reproduce
Steps to reproduce the behavior. For example:
Expected behavior
Rendered QR codes using Jetpack compose. Maybe a quick sample showing it off would help newcomers too!
Screenshots or other QRCodes rendered with other tools
Additional context
Quick sample code
LazyColumn(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Top,
horizontalAlignment = Alignment.CenterHorizontally
) {
item {
Text(text = "QR Examples!")
val qr1 = QRCode.ofSquares()
.withColor(Color.BLUE)
.withBackgroundColor(Color.RED)
.build("Hello QR 1!")
CoilImage(imageModel = { qr1.render() })
Spacer(modifier = Modifier.height(6.dp))
}
item {
val qr2 = QRCode.ofCircles()
.withColor(Color.BLUE)
.withBackgroundColor(Color.RED)
.build("Hello QR 2!")
CoilImage(imageModel = { qr2.render("bmp") })
Spacer(modifier = Modifier.height(6.dp))
}
item {
val qr3 = QRCode.ofCircles()
.withColor(Color.BLUE)
.withBackgroundColor(Color.RED)
.build("Hello QR 3!")
CoilImage(imageModel = { qr3.renderToGraphics().nativeImage() })
Spacer(modifier = Modifier.height(6.dp))
}
}
Describe the bug
I import QRCode library and build in Android Studio
Gradle detect a lot of duplicate classes on library com.android.tools.external.com-intellij:intellij-core:30.1.2
full-output: https://pastebin.mozilla.org/upNGVtqc
After that I checking dependency tree using ./gradlew app:dependencies
It seems that com.android.tools.external.com-intellij:intellij-core
is imported by com.android.tools.lint:lint-gradle
Am I use this library in the wrong way?
To Reproduce
Steps to reproduce the behavior. For example:
implementation 'io.github.g0dkar:qrcode-kotlin-android:3.1.0'
Expected behavior
build sucessfully
Screenshots or other QRCodes rendered with other tools
Additional context
my app:build.gradle
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
android {
compileSdk 32
defaultConfig {
applicationId "at.mikuc.fcuassistant"
minSdk 26
targetSdk 32
versionCode 1
versionName "0.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation 'androidx.activity:activity-compose:1.5.0'
implementation "androidx.navigation:navigation-compose:$nav_version"
api "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation 'com.google.dagger:hilt-android:2.38.1'
kapt 'com.google.dagger:hilt-compiler:2.38.1'
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
implementation 'androidx.datastore:datastore-preferences:1.0.0'
implementation 'org.burnoutcrew.composereorderable:reorderable:0.9.2'
implementation 'io.github.g0dkar:qrcode-kotlin-android:3.1.0'
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
implementation("io.ktor:ktor-client-core:$ktor_version")
implementation("io.ktor:ktor-client-cio:$ktor_version")
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
}
We have not found a way to set the error correction level. It would be nice if this value could be defined externally.
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
I added the lib on my project
Write the flowing code :
QRCode("20333 ").render()
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.
Describe the bug
I created a QR code with the following code
val circleQRCode = QRCode.ofCircles().build("https://sample/alphaskfhdbfebwhnewnew/sdjnbchbwdhvbewhbvhuew") val circlePngData = circleQRCode.render()
To save image on .png format I use the following code (it will be works for android 13 and newest version)
internal class SavePhotoTask(private val context: Context) : AsyncTask<ByteArray?, String?, String?>() { protected override fun doInBackground(vararg jpeg: ByteArray?): String? { val photo = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).toString(), "photo.png") if (photo.exists()) { photo.delete() } try { val fos = FileOutputStream(photo.path) fos.write(jpeg[0]) fos.close() } catch (e: IOException) { Log.e("PictureDemo", "Exception in photoCallback", e) } return null } }
Note: No problem with scanning if I generate rectangle QR instead of circle , also your QR with name example01-circles.png was scanned perfectly but I do not now why since i used same code
Additional context
Finally, I accept that the generated image is not detected fast, for example, I use Google Scanner, the default application scanner but there are not working perfectly, freeze
I use for testing following devices:
Google pixel 7 (android 14)
Redmi not 9s (android 12)
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
I need for a mini IoT project that the qrcode must have a fixed resolution for example 320X320, is that possible ?
I tried to update my project's gradle file to use qrcode-kotlin 4.0.3, but now it won't build because my Android minSdk is 23 and this library wants 24 or newer. I'd like to keep supporting 23 because it makes about a 5% difference to the number of supported devices. Would it be possible for you to restore support for Android API 23 in version 4?
Describe the bug
version: 3.3.0
I'm playing with this library to render very QR codes for very long urls (900 characters) and setting the ErrorCorrectionLevel
doesn't change anything.
Digging a bit more, the error correction level is respected until 858 bytes of data, for example:
myapp://aa/bbbbb?code1=wXtvQ0CZz49wonPSL94ZzsBOHDmlvOIx9iNB1GnobhIZ6qqu4Xbdj11jX3MztHslmNhoPSHoTCNNNJJWdftBoHtfhuczuu2uycQZKLkWy9tlaj0MpUa80hHxUi1aFJ5OuD9To0cuAdzyIg4HIiTeuJrWi38dsg71jOyslAgembgJ0Pc70SxRHKTDovKNy7sTylvXAFKUzKexXIjU7Bs64qFC2wMG1mLMobAPqcaZHiqjhTvHP82RuaV9rz8p0ubLQzM7GtEf2AyCALBc66xVchUYPQAFkYphuSw8l3ZTeB04vePHU84hwfsQfCxutcHXizixUIvnm7NN2NjniqeqYpMnIC4utspDxbjGRH2LlAVgHjY4xZ1iwAJrkw6wjHcHw7VC9kscyn8LF8p4LOHVbv7VzO1A9JNGtzFgvFJJfzPqgGTRdsrskGZa5QQUFiKrM2PqJSSLDchMF18nBVt33MEtWUpubpSqYfucnE5gCju4RMdg03fvV6MQMWfkB23pvjYvmlrN8yTfo1i2iOdMdkWLnhoOxiXC0G2fOX5QmuX0kFDTQ9hDPw3CTVCYeia0ui3N9LNkiZlB6aqrVdVgJe3vpuOJVmE2hWt7EZSlwGHUUQLypD0xry2LGdZXogJsxH6CSfDJDVwNz9VdTlfVwNp1IQNTzGENjjIxgfnYRq3sNgWz5Ht9FlyFuzXBaZMltYBDbmadwnQlwb46UeCptWybw1CizfMrFHxkpM9XfohXzqfLDQgasrwlqsK7YhCztu9SYtb6iEv0dONZewEZVz67Ay5xnb580yTiTOqW7yr5k7NBfGLpd7ki0aJhI22Ofba
Passed that threshold, setting the error correction level has no effect:
myapp://aa/bbbbb?code1=wXtvQ0CZz49wonPSL94ZzsBOHDmlvOIx9iNB1GnobhIZ6qqu4Xbdj11jX3MztHslmNhoPSHoTCNNNJJWdftBoHtfhuczuu2uycQZKLkWy9tlaj0MpUa80hHxUi1aFJ5OuD9To0cuAdzyIg4HIiTeuJrWi38dsg71jOyslAgembgJ0Pc70SxRHKTDovKNy7sTylvXAFKUzKexXIjU7Bs64qFC2wMG1mLMobAPqcaZHiqjhTvHP82RuaV9rz8p0ubLQzM7GtEf2AyCALBc66xVchUYPQAFkYphuSw8l3ZTeB04vePHU84hwfsQfCxutcHXizixUIvnm7NN2NjniqeqYpMnIC4utspDxbjGRH2LlAVgHjY4xZ1iwAJrkw6wjHcHw7VC9kscyn8LF8p4LOHVbv7VzO1A9JNGtzFgvFJJfzPqgGTRdsrskGZa5QQUFiKrM2PqJSSLDchMF18nBVt33MEtWUpubpSqYfucnE5gCju4RMdg03fvV6MQMWfkB23pvjYvmlrN8yTfo1i2iOdMdkWLnhoOxiXC0G2fOX5QmuX0kFDTQ9hDPw3CTVCYeia0ui3N9LNkiZlB6aqrVdVgJe3vpuOJVmE2hWt7EZSlwGHUUQLypD0xry2LGdZXogJsxH6CSfDJDVwNz9VdTlfVwNp1IQNTzGENjjIxgfnYRq3sNgWz5Ht9FlyFuzXBaZMltYBDbmadwnQlwb46UeCptWybw1CizfMrFHxkpM9XfohXzqfLDQgasrwlqsK7YhCztu9SYtb6iEv0dONZewEZVz67Ay5xnb580yTiTOqW7yr5k7NBfGLpd7ki0aJhI22Ofbab
To Reproduce
Steps to reproduce the behavior. For example:
render()
with a low error correction levelExpected behavior
Error correction level would be respected no matter the size of the data
Describe the bug
The method getBytes()
from QRCodeGraphics
is not giving the correct data to generate a QRCode.
To Reproduce
getBytes()
method.ByteArray
generated in an iOS app.Expected behavior
Expected the QRCode to be shown correctly once I pass the ByteArray to NSData, and then from NSData to UIImage.
Additional context
I actually have a fix for this issue and I opened a PR for this. I have found another issue regarding the logos with a background color different than Colors.TRANSPARENT
that only occurs in iOS. I don't know if this could be also a good place to talk about it.
Hello, first thanks for this library, it's nice to see light Kotlin code 👍
Describe the bug
A got the flowing crash running this :
QRCode("20333").encode()
java.lang.StringIndexOutOfBoundsException: length=5; index=6
at java.lang.String.substring(String.java:2060)
at kotlin.text.StringsKt__StringsKt.substring(Strings.kt:393)
at io.github.g0dkar.qrcode.internals.QRNumber.write(QRData.kt:137)
at io.github.g0dkar.qrcode.QRCode.createData(QRCode.kt:353)
at io.github.g0dkar.qrcode.QRCode.encode(QRCode.kt:250)
at io.github.g0dkar.qrcode.QRCode.encode$default(QRCode.kt:231)
To Reproduce
Steps to reproduce the behavior. For example:
Simply run the Kotlin code.
Additional context
I tested this on a physical device (Google Pixel XL) and on a emulator (Pixel 4 API 30), and on both I got this crash.
If I run the folowing Kotlin code I didn't get the crash, but the QrCode is not what I want
QRCode("20333 ").encode()
Is there any chance with this library to decode the QR that has been generated with this library using a camera or import image?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
org.jetbrains.kotlin.android
, org.jetbrains.kotlin.multiplatform
, org.jetbrains.kotlin:kotlin-gradle-plugin
)com.android.application
, com.android.library
)io.kotest.multiplatform
, io.kotest:kotest-runner-junit5
, io.kotest:kotest-framework-engine
, io.kotest:kotest-assertions-core
).github/workflows/dokka-update.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/setup-java v4@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
gradle/gradle-build-action v2@982da8e78c05368c70dac0351bb82647a9e9a5d2
EndBug/add-and-commit v9@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081
.github/workflows/run-tests.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/setup-java v4@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
gradle/gradle-build-action v2@982da8e78c05368c70dac0351bb82647a9e9a5d2
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
org.jetbrains.kotlin:kotlin-gradle-plugin 1.9.22
org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.21
io.kotest:kotest-assertions-core 5.8.0
io.kotest:kotest-framework-engine 5.8.0
io.kotest:kotest-runner-junit5 5.8.0
androidx.core:core-ktx 1.12.0
junit:junit 4.13.2
androidx.test.ext:junit 1.1.5
androidx.test.espresso:espresso-core 3.5.1
androidx.appcompat:appcompat 1.6.1
com.google.android.material:material 1.11.0
androidx.constraintlayout:constraintlayout 2.1.4
androidx.navigation:navigation-fragment-ktx 2.7.7
androidx.navigation:navigation-ui-ktx 2.7.6
com.diffplug.spotless 6.23.3
org.jetbrains.dokka 1.9.20
org.jetbrains.kotlin.multiplatform 1.9.22
io.kotest.multiplatform 5.8.0
com.android.library 8.2.0
io.github.gradle-nexus.publish-plugin 1.3.0
dev.petuska.npm.publish 3.4.2
com.android.application 8.2.0
org.jetbrains.kotlin.android 1.9.22
gradle/wrapper/gradle-wrapper.properties
gradle 8.7
package.json
Hello community!
Describe the bug
So I'm having an issue while trying to compile my KMM project with this library. The error is the following:
e: Could not find "org.jetbrains.kotlin.native.platform.Symbols" in [/Users/my-user/Documents/X/my-project, /Users/my-user/.konan/klib, /Users/my-user/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.10/klib/common, /Users/my-user/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.10/klib/platform/ios_arm64]
To Reproduce
Easily reproducible by trying to use the linkDebugFrameworkIosArm64
.
Expected behavior
To be able to generate the binaries for the Arm64 architecture.
Additional context
As you can tell by the error, I'm already using Kotlin 1.9.10 and I have a Mac with a M2 chip. Feel free to ask for additional info! 😃
Hi :-)
I'm very interested in your library. But for the same string, the QRcode generated by your library is in version 10 (= 57 columns/lines) although the old library I've been currently using (AwesomeQRCode) generates a version 7 (= 45 columns/lines).
I wonder why this difference ? is it a question of EC level used ?
If yes, would it be possible to make this level configurable in your library ?
Thank you for your answer
Implement Kotlin Multiplatform in the Library, so it can support JS and also Android :)
it is possible to generate a Bitmap right away instead of writing to a file first
Describe the bug
When a create a QrCode with only number, it's encode content as byte array and some very common tools can't display content.
To Reproduce
QRCode("123456").render()
QRCode("123456b").render()
When I encode :
123456
-> the content is undetectable as String, only tools supporting byte decoding can display content123456b
-> the content detected by other tools is 4R6T8VY
123456 gg
-> work correclyPS: I used https://zxing.org/w/decode.jspx to decode QrCode
Expected behavior
To generate a QrCode with correct String encoded and be able to decode it with most tools.
The solution can be to create a other constructor who can receive a Byte Array and use the current one only for String OR to add a parameter to specify input type.
I'm sorry, maybe I have misunderstood this. But does your library require an internet connection in order to be used?
Describe the bug
I tried to create a rounded QR Code in my android application and the eyes of the QR Code still is in square.
qrcode-kotlin-android:3.2.0
To Reproduce
Use the same code as in RoundQRCode.kt
Expected behavior
https://github.com/g0dkar/qrcode-kotlin/blob/main/examples/kotlin-round.png
Is your feature request related to a problem?
Releases are not tagged, so there is no way to easily checkout to a specific release without having to go through logs, simultaneously there is no release history that one can look through.
Describe the solution you'd like
Tag releases and include change logs.
This library randomly produces invalid QR-Codes that can't be scanned.
Describe the bug
It's not possible to download the library for projects containing the target iOSX64
To Reproduce
Try to update the library with the 4.1.0 version.
Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of io.github.g0dkar:qrcode-kotlin:4.1.0 was found. The consumer was configured to find a library for use during 'kotlin-metadata', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' but:
Additional context
This might be related with the last changes made on build.gradle.kts, given that the iOSX64 target was deleted and not added again to the list.
Thanks!
Describe the bug
Hello, when I try to use other shapes than squares on iOS generated library than the QR code is not visible at all. I tried to change parameters like color and sizes but the result is always the same. It works perfectly on Android (with same parameters).
To Reproduce
Steps to reproduce:
.ofCircles()
to QRCode builderScreenshots or other QRCodes rendered with other tools
Additional context
Xcode 15.2
Result is same on physical device and Simulator
Describe the bug
Yeah... as the title says. My bad :')
To Reproduce
Steps to reproduce the behavior. For example:
Expected behavior
An actual, working docs with cool examples! hahaha ^^
Screenshots or other QRCodes rendered with other tools
Additional context
feature: add a logo image at the center of QR code. Do you have a plan to support this feature?
Hi @g0dkar!
Are you planning on adding native target support for this project to be able to use it in a KMM project (more specifically Android & iOS KMM project)?
We've found that using the kotlin-only dependency (io.github.g0dkar:qrcode-kotlin:3.2.0) in our project results in the following error:
No matching variant of io.github.g0dkar:qrcode-kotlin:3.2.0 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' but:
- Variant 'jvmApiElements-published' capability io.github.g0dkar:qrcode-kotlin:3.2.0 declares an API of a library:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
Thank you in advance!
Hi,
Since each position probe is rendered with the renderControlSquare
, it is not possible to use a custom color function to color each square with a different color because they will all use the color of the parent square.
For now, I overwrote renderControlSquare
in my custom shape function to produce the result I wanted but I was wondering if it was possible in a next version to only use a custom color function to do this (for example, by using renderSquare
for all the squares)?
Thank you in advance for your answer and thanks for all the work you did so far on the library.
Hello everyone!
Feel free to leave any and all feedback of the iOS and tvOS support now available at v4.0.1
Thank you all so much for using, and hopefully enjoying, this project ^^
Describe the bug
A clear and concise description of what the bug is.
From https://github.com/g0dkar/qrcode-kotlin
In installation:
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
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
To
implementation("io.github.g0dkar:qrcode-kotlin:4.1.0")
// 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) }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.