background_locator icon indicating copy to clipboard operation
background_locator copied to clipboard

App not building at runtime on Android

Open Tedsterh opened this issue 4 years ago • 4 comments

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

Tedsterh avatar Jan 27 '21 01:01 Tedsterh

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

oligazar avatar Jan 28 '21 12:01 oligazar

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

oligazar avatar Jan 28 '21 14:01 oligazar

@oligazar Cheers! This fixed it for me

Tedsterh avatar Jan 29 '21 21:01 Tedsterh

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...

michaelchiew08 avatar May 03 '21 17:05 michaelchiew08