Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AbstractMethodError for LocationListener even app built with compileSdkVersion 30

Below exception is getting thrown for some devices which has Android 9 (API level 28).

Fatal Exception: java.lang.AbstractMethodError: abstract method "void android.location.LocationListener.onStatusChanged(java.lang.String, int, android.os.Bundle)"

With this cause seems I am missing some fundamental concepts, as per my assumption app shouldn't throw this exception as app built with compileSdkVersion 30 meaning that we don't need to override default methods defined in LocationListener.

Please help me to understand above issue.

If we had to override to avoid above issue then seems issues is with Android SDK.

EDIT : Here is the update from Google team

https://issuetracker.google.com/issues/190695723

like image 974
Krishna Sharma Avatar asked May 25 '26 14:05

Krishna Sharma


1 Answers

you use locationListenerCompat,later succesfully

like image 68
muhammed koç Avatar answered May 27 '26 02:05

muhammed koç



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!