diefferson / http_certificate_pinning

Https Certificate pinning for Flutter
Apache License 2.0
84 stars 74 forks source link

with new kotlin version not working #68

Open yogeshmarathe2012 opened 1 month ago

yogeshmarathe2012 commented 1 month ago

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Running Gradle task 'assembleDebug'... e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.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.7.1. e: C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.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.7.1. e: C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.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.7.1. e: C:/Users/.gradle/caches/transforms-3/c321e7444a5c731da2398570d6ef04f1/transformed/jetified-kotlin-stdlib-common-1.9.0.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.7.1. e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (34, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (35, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (39, 6): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/jvm/JvmStatic.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (42, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (48, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (54, 7): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (55, 43): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (56, 11): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (58, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (62, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (68, 20): Unresolved reference: HashMap e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (68, 61): Unresolved reference: HashMap e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (78, 18): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (82, 18): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (87, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (91, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (95, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (99, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (107, 32): Unresolved reference: map e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (107, 38): Cannot infer a type for this parameter. Please specify it explicitly. e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (107, 75): Unresolved reference: toRegex e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (110, 4): Class 'kotlin.jvm.Throws' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/jvm/Throws.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (116, 18): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 28): Type mismatch: inferred type is (String) -> Unit but (String, String) -> Unit was expected e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 30): Expected 2 parameters of types String, String e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 31): Destructuring declaration initializer of type String must have a 'component1()' function e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 36): Destructuring declaration initializer of type String must have a 'component2()' function e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (117, 57): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (119, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from C:/Users/.gradle/caches/transforms-3/431ce31617111116ed092b20fb775fda/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (129, 20): Unresolved reference: map e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (129, 33): Unresolved reference: format e: C:\Users\AppData\Local\Pub\Cache\hosted\pub.dev\http_certificate_pinning-2.1.3\android\src\main\kotlin\diefferson\http_certificate_pinning\HttpCertificatePinningPlugin.kt: (129, 48): Unresolved reference: it

FAILURE: Build failed with an exception.

BUILD FAILED in 49s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │ │ update the │ │ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of │ │ android\settings.gradle. │ │ │ │ Alternatively (if your project was created before Flutter 3.19), update │ │ android\build.gradle │ │ ext.kotlin_version = '' │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ Error: Gradle task assembleDebug failed with exit code 1

nachiket-gohil commented 1 week ago

Same issue is occuring in my case. However, if I update the Kotlin version in plugins' gradle file, then it runs successfully. But it still gives the same error mentioned in this issue #55.