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

Unable to upgrade v2.1.0 #1500

Open
minorlai opened this issue Feb 27, 2025 · 12 comments
Open

Unable to upgrade v2.1.0 #1500

minorlai opened this issue Feb 27, 2025 · 12 comments

Comments

@minorlai
Copy link

Note:

An crash issue will be ignored & closed in a week without logs.

The language of MMKV

e.g. Objective-C, Swift, Java, or Kotlin

Kotlin

The version of MMKV

e.g. v1.2.2
Note: For versions older than the latest version, please upgrade before posting any issue.
We don't have much time for old version tech support.

v2.1.0

The platform of MMKV

e.g. iOS or Android

Android

The installation of MMKV

e.g. Cocoapods, Maven, or Git clone

Maven

What's the issue?

For old projects, projects with Kotlin versions below 1.8 cannot be upgraded to higher versions, and cannot be upgraded to MMKV v2.1.0

@lingol
Copy link
Collaborator

lingol commented Feb 27, 2025

How about upgrading your kotlin version?

@minorlai
Copy link
Author

目前项目的架构不支持升级 kotlin1.8 的版本,所以无法升级 v2.1.0 的 mmkv

@lingol
Copy link
Collaborator

lingol commented Feb 27, 2025

I've never thought that upgrading Kotlin would be a problem. If it's such a pain for some users, we might downgrade it to Kotlin 1.9.x as before.

lingol added a commit that referenced this issue Feb 27, 2025
@minorlai
Copy link
Author

Old projects are still using databinding, which is not allowed in kotlin1.8.x, which is undoubtedly a very large workload.

@lingol
Copy link
Collaborator

lingol commented Feb 28, 2025

Wait what, you can't even upgrade to Kotlin 1.8.x you said?

Can you upgrade to MMKV 2.0.2?

@minorlai
Copy link
Author

2.0.2 can be upgraded successfully

@lingol
Copy link
Collaborator

lingol commented Feb 28, 2025

Then why did said you can't upgrade to kotlin 1.8.x? MMKV 2.0.2 is Kotlin 1.9.x.

@minorlai
Copy link
Author

There is no problem with upgrading to 2.0.2, but when upgrading to 2.1.0, the local kotlin needs to be upgraded to 1.9.x during compilation. Are there any other libraries added in the 2.1.0 version? The current kotlin version is 1.7.21

@lingol
Copy link
Collaborator

lingol commented Feb 28, 2025

I've no idea. Can you provide a demo project to reproduce this issue?

@minorlai
Copy link
Author

Upgrade to 2.1.0, compile time:
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/allen/.gradle/caches/transforms-3/47abdf45a5bc13cd3cab29ee09be8dbb/transformed/jetified-annotation-jvm-1.9.1.jar!/META-INF/annotation.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.

2.0.2 No problem

@minorlai
Copy link
Author

minorlai commented Mar 2, 2025

Upgrade to 2.1.0, compile time: e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: /Users/allen/.gradle/caches/transforms-3/47abdf45a5bc13cd3cab29ee09be8dbb/transformed/jetified-annotation-jvm-1.9.1.jar!/META-INF/annotation.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.

2.0.2 No problem

This problem is a problem that occurs when compiling after upgrading

@lingol
Copy link
Collaborator

lingol commented Mar 2, 2025

I hate to repeat myself but you got to provide a reproducible demo project or we will have to ignore the issue for no way to investigate.

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

2 participants