Reason:
The reason why this error occurs is that “the binary version of its metadata is 1.7.1, but the intended version is 1.5.1.“
It’s possible that this error was thrown by Android Studio since you concurrently added Jetpack Compose and Room for a new app.
/***/***/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.7.0/51736992f422993a1e741051bdf3c12801bc1ca1/kotlin-stdlib-common-1.7.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.7.1, expected version is 1.5.1.
Solution 1:
You did not encounter the error when you developed codes that did not make use of Room libraries. Here are some potential solutions to this issue that you could attempt.
- Upgrading Android Studio and the Kotlin version
- This page has been referred to: This module was compiled using a version of Kotlin that is not compatible. 1.5.1 is the binary version of its metadata, while 1.1.15 is the version that is intended.
However, you wil unable to locate “ext.kotlin version = ‘xxx’.,” so you can write this code in build. gradle.
Solution 2:
It is recommended that you upgrade Kotlin to version 1.7.10 and compose to version 1.3.0. If it does not work, try using compose version 1.2.0 and kotlin version 1.7.0. You’ll also be able to find all of the guidelines from ITtutoria.
Compose Compiler Version | Compatible Compiler Version |
1.3.0 | 1.7.10 |
1.3.0-rc01 | 1.7.10 |
1.3.0-beta01 | 1.7.10 |
1.2.0 | 1.7.0 |
1.2.0-rc01 | 1.6.21 |
1.2.0-beta03 | 1.6.21 |
1.2.0-alpha08 | 1.6.20 |
1.1.0 | 1.6.10 |
1.1.1 | 1.6.10 |
1.1.0-rc03 | 1.6.10 |
Also ensure that the same variable is used for the Kotlin Gradle Plugin in the build.gradle file of the project.
classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin version”
Closing Remarks
We sincerely hope that going through our method to fix this problem was enjoyable for you. We are confident that you will be able to address the problem with the message that says your “the binary version of its metadata is 1.7.1, expected version is 1.5.1” as a result of the information that has been provided.
It would be best for you to visit ITtutoria if you are still having trouble finding a solution to this problem. ITtuoria is a website that is managed by experts and is where you will be able to get a comprehensive answer to this issue. Nearly, they have articles on a variety of other faults that are similar to this one.
The system’s overall position will also improve as a result of this change, in addition to the fact that it will provide adequate error handling. The first thing that needs to be done in order to make a system more secure is to identify the error handlers that are currently being employed and then switch them out for techniques that are safer.
You may be interested in: Beginner’s Guide to Trading Binary Options
from Latest Technology News https://ift.tt/cDX3Lnv
via IFTTT
0 Comments