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 classes error on Android #10

Closed
sinhpn92 opened this issue Feb 8, 2022 · 3 comments
Closed

Incompatible classes error on Android #10

sinhpn92 opened this issue Feb 8, 2022 · 3 comments

Comments

@sinhpn92
Copy link

sinhpn92 commented Feb 8, 2022

Hi team,
I have an issue on Android.
I got the error:

e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: .../.gradle/caches/transforms-2/files-2.1/185d46b6321985f52dcc07c04b9e0199/jetified-kotlin-stdlib-common-1.5.31.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.5.1, expected version is 1.1.15.
...
...
e: .../.pub-cache/hosted/pub.dartlang.org/nsd_android-1.0.3/android/src/main/kotlin/com/haberey/flutter/nsd_android/NsdAndroidPlugin.kt: (15, 27): Unresolved reference: HashMap
...

What's wrong there? Have any ideal to help fix this issue? Thank you so much.

@sebastianhaberey
Copy link
Owner

Hi @sinhpn92

I've never seen this before. Since the integration test passes on the latest version, my first guess would be that it's something in your environment. I may be wrong, of course. Try running flutter clean in your project.

What are you trying to do? Are you using the plugin via dependency, or are you trying to build it from source?

@sebastianhaberey sebastianhaberey added the waiting for user feedback Additional information requested from user label Feb 8, 2022
@sebastianhaberey
Copy link
Owner

Also, if you're using Android Studio, try menu > File > Invalidate Caches / Restart.

@sinhpn92
Copy link
Author

sinhpn92 commented Feb 9, 2022

Thank you @sebastianhaberey ,
I fixed this issue. Cause by the root project gradle. It's used implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version". I change to implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version".

Now It's solved.

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