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

geolocator_android deprecated issues #1516

Open
3 of 8 tasks
ICP-Theo opened this issue May 20, 2024 · 5 comments
Open
3 of 8 tasks

geolocator_android deprecated issues #1516

ICP-Theo opened this issue May 20, 2024 · 5 comments

Comments

@ICP-Theo
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Proposal

warning: [deprecation] onStatusChanged(String,int,Bundle) in LocationListener has been deprecated
warning: [deprecation] LocationProvider in android.location has been deprecated
warning: [deprecation] AVAILABLE in LocationProvider has been deprecated
warning: [deprecation] OUT_OF_SERVICE in LocationProvider has been deprecated

Pitch

these warnings keep popping up and can lead to unwanted behaviour

@mugambikimathi
Copy link

mugambikimathi commented May 21, 2024

same issue. Created a new project, added the plugin and failed.

[!] 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 /home/mugambi/Documents/acode/sample/android/build.gradle: │
│ ext.kotlin_version = ''

@fazelit
Copy link

fazelit commented May 21, 2024

error for me:
`Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\foula.gradle\caches\transforms-3\431ce31617111116ed092b20fb775fda\transformed\jetified-kotlin-stdlib-1.9.0.jar!\META-INF\kotlin-stdlib-jdk7.kotlin_module: error: 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.
C:\Users\foula.gradle\caches\transforms-3\431ce31617111116ed092b20fb775fda\transformed\jetified-kotlin-stdlib-1.9.0.jar!\META-INF\kotlin-stdlib-jdk8.kotlin_module: error: 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.
C:\Users\foula.gradle\caches\transforms-3\431ce31617111116ed092b20fb775fda\transformed\jetified-kotlin-stdlib-1.9.0.jar!\META-INF\kotlin-stdlib.kotlin_module: error: 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.
C:\Users\foula.gradle\caches\transforms-3\c321e7444a5c731da2398570d6ef04f1\transformed\jetified-kotlin-stdlib-common-1.9.0.jar!\META-INF\kotlin-stdlib-common.kotlin_module: error: 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.

  • What went wrong:
    Execution failed for task ':app:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 2m 57s

┌─ 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 D:\MyApp\Projects\khorshid-taban-sahel\flutter\android\build.gradle: │
│ ext.kotlin_version = '' │
└────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
`

@rminkler1
Copy link

rminkler1 commented May 22, 2024

EDITED WORKAROUND:

Add this line to your pubspec.yaml dependencies to revert to the previous android implementation. Resolves two issues. The Kotlin Gradle Plugin and coarse location permissions.


dependencies:
  geolocator_android: 4.5.5

@pzentenoe
Copy link

I have the same error
┌─ 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 /Users/pzenteno/projects/flutter/maps_app/android/build.gradle: │ │ ext.kotlin_version = '<latest-version>' │ └────────────────────────────────────────────────────────────────────────────────────────────┘ Error: Gradle task assembleDebug failed with exit code 1

@BLKKKBVSIK
Copy link

Same issue.
Using a dependency override with geolocator_android: 4.5.5 does the trick.

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

6 participants