Skip to content

🐛 Build error in version 0.7.2 with react-native 0.74.4 and kotlin 1.9 #403

@Regina-v

Description

@Regina-v

What's happening?

After upgrading react-native-quick-crypto to 0.7.2 I was not able to build my app anyomore in android. My app uses react-native 0.74.4.

The build failed with:


* What went wrong:
A problem occurred configuring root project 'myApp'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:.
        Required by:
            project :

When I add the kotlin version explicitely in the android/build.gradle like so:

classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")

I get tons of errors like

e: /path/to/my-app/node_modules/@react-native/gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt: (27, 12): Class 'kotlin.collections.ArraysKt___ArraysKt' 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 /path/to/.gradle/wrapper/dists/gradle-8.6-all/3mbtmo166bl6vumsh5k2lkq5h/gradle-8.6/lib/kotlin-stdlib-1.9.20.jar!/kotlin/collections/ArraysKt___ArraysKt.class

I was confused about who is expecting kotlin 1.7 in my app since I'm using react-native 0.74.4 and react-native itself upgraded to kotlin 1.9 in RN 0.74. I found out that react-native-quick-crypto brings react-native 0.72.7 into my app which uses kotlin 1.7, which is then picked up and brings the build errors.

Downgrading react-native-quick-crypto to 0.7.1 solves the issue for me since react-native 0.72.7 was only added as a dependency in 0.7.2.

Reproducible Code

N/A

Relevant log output

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'myApp'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:.
        Required by:
            project :

Device

Android

QuickCrypto Version

0.7.2

Can you reproduce this issue in the QuickCrypto Example app?

No, I cannot reproduce the issue in the Example app

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions