Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with new react-native #160

Open
sparrowek opened this issue Jan 6, 2023 · 4 comments
Open

Incompatible with new react-native #160

sparrowek opened this issue Jan 6, 2023 · 4 comments

Comments

@sparrowek
Copy link

I have errors running project after I have added this module

Task :react-native-receive-sharing-intent:compileDebugKotlin FAILED
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: C:/Users/Przemek/.gradle/caches/transforms-3/2cfe106a332c6a6f2245988cf5920bcb/transformed/jetified-kotlin-stdlib-common-1.6.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.6.0, expected version is 1.1.15.
e: C:/Users/Przemek/.gradle/caches/transforms-3/8fa201288e2c6500b9e1af2f8ed9c77c/transformed/jetified-kotlin-stdlib-jdk7-1.6.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.6.0, expected version is 1.1.15.
e: C:/Users/Przemek/.gradle/caches/transforms-3/b6d16718b0badf943a01bd505b26edc1/transformed/jetified-kotlin-stdlib-jdk8-1.6.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.6.0, expected version is 1.1.15.
e: C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.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.6.0, expected version is 1.1.15.
e: C:/Users/Przemek/.gradle/caches/transforms-3/ef154a7ff5c9e83f423d62f01250b0da/transformed/jetified-react-native-0.70.5-debug-api.jar!/META-INF/ReactAndroid_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (32, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected
version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (34, 7): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected
version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 27): Unresolved reference: split
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 37): Unresolved reference: toRegex
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 64): Unresolved reference: it
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (39, 43): Cannot find a parameter with this name: ignoreCase
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (44, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 27): Unresolved reference: split
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 37): Unresolved reference: toRegex
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 64): Unresolved reference: it
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (60, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected
version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (73, 45): Cannot find a parameter with this name: ignoreCase
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (107, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (112, 22): Unresolved reference: with
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (114, 13): Unresolved reference: startsWith
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (115, 13): Unresolved reference: startsWith
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (123, 53): Unresolved reference: use
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (123, 59): Cannot infer a type for this parameter. Please specify it explicitly.
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (124, 38): Unresolved reference: use
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (124, 44): Cannot infer a type for this parameter. Please specify it explicitly.
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (142, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\ReceiveSharingIntentPackage.kt: (11, 16): Unresolved reference: listOf
e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\ReceiveSharingIntentPackage.kt: (15, 16): Unresolved reference: emptyList

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-receive-sharing-intent:compileDebugKotlin'.

Compilation error. See log for more details

@mthlongwane
Copy link

Im having a simmmilar issue

@Gobinda74
Copy link

I have errors running project after I have added this module

Task :react-native-receive-sharing-intent:compileDebugKotlin FAILED e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: C:/Users/Przemek/.gradle/caches/transforms-3/2cfe106a332c6a6f2245988cf5920bcb/transformed/jetified-kotlin-stdlib-common-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/Przemek/.gradle/caches/transforms-3/8fa201288e2c6500b9e1af2f8ed9c77c/transformed/jetified-kotlin-stdlib-jdk7-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/Przemek/.gradle/caches/transforms-3/b6d16718b0badf943a01bd505b26edc1/transformed/jetified-kotlin-stdlib-jdk8-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/Przemek/.gradle/caches/transforms-3/ef154a7ff5c9e83f423d62f01250b0da/transformed/jetified-react-native-0.70.5-debug-api.jar!/META-INF/ReactAndroid_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (32, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (34, 7): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 27): Unresolved reference: split e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 37): Unresolved reference: toRegex e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (36, 64): Unresolved reference: it e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (39, 43): Cannot find a parameter with this name: ignoreCase e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (44, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 27): Unresolved reference: split e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 37): Unresolved reference: toRegex e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (56, 64): Unresolved reference: it e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (60, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (73, 45): Cannot find a parameter with this name: ignoreCase e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (107, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (112, 22): Unresolved reference: with e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (114, 13): Unresolved reference: startsWith e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (115, 13): Unresolved reference: startsWith e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (123, 53): Unresolved reference: use e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (123, 59): Cannot infer a type for this parameter. Please specify it explicitly. e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (124, 38): Unresolved reference: use e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (124, 44): Cannot infer a type for this parameter. Please specify it explicitly. e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\FileDirectory.kt: (142, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/Przemek/.gradle/caches/transforms-3/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\ReceiveSharingIntentPackage.kt: (11, 16): Unresolved reference: listOf e: C:\Users\Przemek\GitRepository\memorizer-react-native\memorizer\node_modules\react-native-receive-sharing-intent\android\src\main\java\com\reactnativereceivesharingintent\ReceiveSharingIntentPackage.kt: (15, 16): Unresolved reference: emptyList

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-receive-sharing-intent:compileDebugKotlin'.

Compilation error. See log for more details

I had a same issue regarding compileDebugKotlin version missmatch. I solved it by defining kotlin version in build.gradle like this -
buildscript {
ext {
buildToolsVersion = "xxxx"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion= "1.6.0" <-------- adding this line
}
repositories {
google()
mavenCentral()
}
dependencies {
.........
.........
}
}

@spyglee
Copy link

spyglee commented Jun 12, 2023

What about iOS?

@achorein
Copy link

achorein commented Aug 24, 2023

just found a workaround for iOS in this issue #170 (comment).

For android the tricks for kotlinVersion can be directly added to expo-build-properties plugins options, but not work in SDK 49 (i'm staying in expo 46 for now)

plugins: [
  [
    'expo-build-properties',
    {
      android: {
        kotlinVersion: '1.6.10',
      },
    },
  ],
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants