Reputation: 1
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\Zayn\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_qr_reader-1.0.5\android\src\main\java\me\hetian\flutter_qr_reader\factorys\QrReaderFactory.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\Users\Zayn\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_share-2.0.0\android\src\main\java\com\example\fluttershare\FlutterSharePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 3504 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app. e: C:/Users/Zayn/Downloads/Compressed/qrscanner/build/qr_code_scanner/.transforms/021c879f8c1e13385eb615ee08d0d463/transformed/out/jars/classes.jar!/META-INF/qr_code_scanner_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/Downloads/Compressed/qrscanner/build/mnc_identifier_ocr/.transforms/e71b1678a7863fab0e98675b1d2f81fc/transformed/out/jars/classes.jar!/META-INF/mnc_identifier_ocr_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/Downloads/Compressed/qrscanner/build/barcode_scan2/.transforms/0913797a64b10e77a80850f689eb1b5c/transformed/out/jars/classes.jar!/META-INF/barcode_scan2_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/Downloads/Compressed/qrscanner/build/native_barcode_scanner/.transforms/cac7605b522faac5454338b5f0177f3b/transformed/out/jars/classes.jar!/META-INF/native_barcode_scanner_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/28f4103f9354ed7c4d72875f697387e3/transformed/jetified-activity-1.7.2/jars/classes.jar!/META-INF/activity_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/10f91cb276ff489fa67dbb19241dbb9e/transformed/lifecycle-livedata-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/8a8d8635d71f1e6ed0830ccbef4ec5e5/transformed/lifecycle-viewmodel-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/3dd404e8e126bce29baa15cf46c739ad/transformed/lifecycle-livedata-core-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata-core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/9bd0ff498db760bfcc790359fe8d6e4f/transformed/jetified-lifecycle-viewmodel-savedstate-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel-savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/44130fe9f7aa4e479b7c41de20944d33/transformed/jetified-core-ktx-1.10.1/jars/classes.jar!/META-INF/core-ktx_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/1ef430611002ea02c2a417d6a8e7a0fc/transformed/core-1.10.1/jars/classes.jar!/META-INF/core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/ce32acd922a52a75017a34cee54040b2/transformed/lifecycle-runtime-2.6.1/jars/classes.jar!/META-INF/lifecycle-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.6.1/10f354fdb64868baecd67128560c5a0d6312c495/lifecycle-common-2.6.1.jar!/META-INF/lifecycle-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/transforms-3/093aca941d8f7ac906404f798bcb0149/transformed/jetified-savedstate-1.2.1/jars/classes.jar!/META-INF/savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation-jvm/1.6.0/a7257339a052df0f91433cf9651231bbb802b502/annotation-jvm-1.6.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.10/72812e8a368917ab5c0a5081b56915ffdfec93b7/kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.10/72812e8a368917ab5c0a5081b56915ffdfec93b7/kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.10/72812e8a368917ab5c0a5081b56915ffdfec93b7/kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. e: C:/Users/Zayn/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.10/dafaf2c27f27c09220cee312df10917d9a5d97ce/kotlin-stdlib-common-1.9.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. ERROR:C:\Users\Zayn.gradle\caches\transforms-3\2c9ff898b291dbadb72b623168d34942\transformed\jetified-zxing-android-embedded-4.3.0-runtime.jar: R8: Type com.google.zxing.client.android.camera.open.OpenCameraInterface is defined multiple times: C:\Users\Zayn.gradle\caches\transforms-3\2c9ff898b291dbadb72b623168d34942\transformed\jetified-zxing-android-embedded-4.3.0-runtime.jar:com/google/zxing/client/android/camera/open/OpenCameraInterface.class, C:\Users\Zayn\Downloads\Compressed\qrscanner\build\flutter_qr_reader\intermediates\runtime_library_classes_jar\release\classes.jar:com/google/zxing/client/android/camera/open/OpenCameraInterface.class
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable Compilation failed to complete, origin: C:\Users\Zayn.gradle\caches\transforms-3\2c9ff898b291dbadb72b623168d34942\transformed\jetified-zxing-android-embedded-4.3.0-runtime.jar:com/google/zxing/client/android/camera/open/OpenCameraInterface.class
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
BUILD FAILED in 3m 26s
I was trying to build an apk by using Flutter clean first then Flutter Build apk command in terminal. But keep reciving this error when i change a few things to fix error then it says upgrade you kotlin i did upgrade but the same error appears again. I am a begginer so i am not able to resolve it.plus the app is running properly with all features when i run it on my phone with debug. what should i do
Upvotes: 0
Views: 378
Reputation: 66
In src/android/app/build.gradle, enable the minify:
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
crunchPngs false
shrinkResources true
***minifyEnabled*** true
signingConfig signingConfigs.release
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
signingConfig signingConfigs.debug
}
}
Upvotes: 1