-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
[Bug]: Requires newer version of Kotlin Gradle Plugin #1517
Comments
i am also facing the same issue |
This is related to geolocator_android 4.6.0 |
Thanks @rminkler1
|
Thanks @rminkler1 Now Its Working Perfectolly |
Wow! |
I do believe you, because I was also battling this for days. I updated Flutter and I thought I broke something with my Flutter install. It took me almost a week to figure out it was this package. |
thank you bro |
@anmol-me @rminkler1 what version to use for location package? |
geolocator: ^12.0.0 |
@rminkler1 sir i am asking for location package not for geolocator.. |
Then I'm afraid I don't understand what you are asking. Geolocator is the package that gets the location of the device. This thread is about a bug in the Android implementation of that package and how to workaround that bug until it is fixed. |
@Meizzosama Hey, please search if you can find a similar issue with the author of location package. If you can't find it, please raise the issue with the author. Here is a link to help you get started: https://github.com/Lyokone/flutterlocation/issues |
@anmol-me Brother i found the solution. i-e, I haven't updated the kotlin version on file "settings.gradle" that's why it was giving me that error, but later on i fixed it. Thanks a bunch for your reply :) |
@rminkler1 thanks, switching to |
Facing the same problem, after searching for days found out that geolocator causing it. hope it will be fixed soon. |
So for some reason when you add geolocator_android: 4.5.5 it fixes the issue and then you can remove geolocator_android: 4.5.5 afterwards and geolocator: ^12.0.0 will work without it. |
geolocator: ^12.0.0 still gives an error |
Add the following two dependencies: Run the following commands: |
That might happen if you don't re-run pub get. I suspect if you run pub get again, it breaks again. |
Thanks @rminkler1, fixed my issue |
nope mine works perfectly without ' geolocator_android'🤷🏻 ran multiple pub gets and cleans and nothing breaks |
This Error FAILURE: Build failed with an exception.
BUILD FAILED in 9s ┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐ packace version: buildscript {
} allprojects { rootProject.buildDir = "../build" tasks.register("clean", Delete) { plugins { } def localProperties = new Properties() def flutterVersionCode = localProperties.getProperty("flutter.versionCode") def flutterVersionName = localProperties.getProperty("flutter.versionName") def keystoreProperties = new Properties()
// signingConfig signingConfigs.debug flutter { |
You can try adding dependencies After that just try performing the above-mentioned steps. geolocator: ^12.0.0 geolocator_android: 4.5.5 Make sure to perform these two steps just because I did not clean it, it took me 2 hours to figure it out |
After further investigations I conclude the issue is related to another library. Please ignore this post. |
I wonder if it would work using the dependency override for the Android module instead of declaring it directly. I also saw an update to the Android module to fix some bugs. I don't think it fixes this issue, but it might work without the override now. Worth trying |
thanks bro, i also fixed it by your comment. it's blocking me for two days.... |
I am also facing the same issue... geolocator: ^12.0.0 flutter clean Thanks @rminkler1 fixed my issue |
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
Expected results
Should run without any errors.
Actual results
App doesn't run
Code sample
android\build
app\build
Version
12.0.0
Flutter Doctor output
e: C:/Users/Anmol/.gradle/caches/transforms-3/362b2d499a05b04c0c112f7a304aa7e2/transformed/jetified-kotlin-stdlib-common-1.9.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.9.0, expected version is 1.7.1.
e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk7.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.
e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk8.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.
e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib.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.
FAILURE: Build failed with an exception.
Execution failed for task ':app:compileDebugKotlin'.
BUILD FAILED in 7s
┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │
│ update C:\Users\Anmol\FlutterProjects\travel_project\android\build.gradle: │
│ ext.kotlin_version = '' │
└────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
The text was updated successfully, but these errors were encountered: