flutterlocation icon indicating copy to clipboard operation
flutterlocation copied to clipboard

Constant kotlin and gradle conflict

Open abdorll opened this issue 1 year ago • 11 comments

The class is loaded from C:/Users/user/.gradle/caches/transforms-3/c43036033b2a850b7b4fea83f4ff1678/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dev\location-5.0.3\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (101, 9): Class 'kotlin.Unit' was c ompiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

abdorll avatar Jun 06 '24 17:06 abdorll

Running into the same issue

mccabejj avatar Jun 09 '24 03:06 mccabejj

i have faced this issue too

kelemu777 avatar Jun 10 '24 12:06 kelemu777

SAME HERE, HELP PLEASE 💀

5c0rp264 avatar Jun 10 '24 14:06 5c0rp264

i have solve it now, by downgrading packages i use, the causes for me is a geolocator package , by downgrading this package i solve it

kelemu777 avatar Jun 10 '24 14:06 kelemu777

Geolocator is a separated package not related to flutter location from my understanding...

5c0rp264 avatar Jun 10 '24 15:06 5c0rp264

which package you use geolocator or location?

if you use location also u need to decrease it's version

kelemu777 avatar Jun 10 '24 15:06 kelemu777

I tried both, which version do you have exactly that is working ? Might be a needed answer anyway for everyone using either of those.

5c0rp264 avatar Jun 10 '24 15:06 5c0rp264

I fixed mine by simply entirely removing the location package and using geolocator, since they both serve the same purpose fir my use case.

On Mon, 10 Jun 2024, 4:21 pm 5c0rp264, @.***> wrote:

I tried both, which version do you have exactly that is working ? Might be a needed answer anyway for everyone using either of those.

— Reply to this email directly, view it on GitHub https://github.com/Lyokone/flutterlocation/issues/958#issuecomment-2158646296, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARVFOMO7UL742F2F7GMX3TTZGW77VAVCNFSM6AAAAABI5GH7CCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYGY2DMMRZGY . You are receiving this because you authored the thread.Message ID: @.***>

abdorll avatar Jun 10 '24 15:06 abdorll

Related to #948

5c0rp264 avatar Jun 10 '24 15:06 5c0rp264

I faced this too. Fixed it by upgrading the kotlin version in android/settings.gradle.

plugins { ... id "org.jetbrains.kotlin.android" version '2.0.0' apply false ... }

rajeev1982 avatar Jun 18 '24 03:06 rajeev1982

Thank you @rajeev1982, this fixed it for me.

AhmedMT3 avatar Aug 02 '24 08:08 AhmedMT3