rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
288 stars 329 forks source link

App not building at runtime on Android #188

Open Tedsterh opened 3 years ago

Tedsterh commented 3 years ago

Whenever I try to run the app I get a FAILURE: Build failed with an exception.

.pub-cache/hosted/pub.dartlang.org/background_locator-1.4.0+1/android/src/main/kotlin/rekab/app/background_locator/provider/AndroidLocationProviderClient.kt: (13, 1): Class 'AndroidLocationProviderClient' is not abstract and does not implement abstract member @Deprecated public abstract fun onStatusChanged(p0: String!, p1: Int, p2: Bundle!): Unit defined in android.location.LocationListener

These are the logs from flutter run

oligazar commented 3 years ago

same problem here. Tried solutions from here https://stackoverflow.com/questions/55399209/update-flutter-dependencies-in-pub-cache but none of them worked

oligazar commented 3 years ago

@Tedsterh for me changing compileSdkVersion from 29 to 30 inside app/build.gradle fixed the issue.

Tedsterh commented 3 years ago

@oligazar Cheers! This fixed it for me

michaelchiew08 commented 3 years ago

compileSdkVersion to 30 doesn't work for me :(


edited: the main culprit is this "LocationClient.android"... change to LocationClient.google will solve the problem for me...

However if devices that does not support Google service such as most recent Huawei device might going to have a lot of problem at the moment...