rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
287 stars 321 forks source link

Error java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient #357

Closed abedputra closed 1 year ago

abedputra commented 1 year ago

I just found an error like this when running my App

D/AndroidRuntime(16579): Shutting down VM
E/AndroidRuntime(16579): FATAL EXCEPTION: main
E/AndroidRuntime(16579): java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/~~KvMgk1xXU1Va-RNufrd5Fg==/com.my.ientry.mypersonal.system-xXn3QY3cUGgQp0Z-wJ0ZFw==/base.apk)
E/AndroidRuntime(16579):        at com.almoullim.background_location.LocationUpdatesService.getLastLocation(LocationUpdatesService.kt:188)
E/AndroidRuntime(16579):        at com.almoullim.background_location.LocationUpdatesService.onCreate(LocationUpdatesService.kt:125)
E/AndroidRuntime(16579):        at android.app.ActivityThread.handleCreateService(ActivityThread.java:4648)
E/AndroidRuntime(16579):        at android.app.ActivityThread.access$1900(ActivityThread.java:275)
E/AndroidRuntime(16579):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2187)
E/AndroidRuntime(16579):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(16579):        at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime(16579):        at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime(16579):        at android.app.ActivityThread.main(ActivityThread.java:8280)
E/AndroidRuntime(16579):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16579):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
E/AndroidRuntime(16579):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
W/personal.system(16579): type=1400 audit(0.0:31782): avc: denied { search } for name="mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
W/personal.system(16579): type=1400 audit(0.0:31783): avc: denied { search } for name="mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
W/personal.system(16579): type=1400 audit(0.0:31784): avc: denied { search } for name="mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
W/OOMEventManagerFK(16579): Failed to mkdir /data/mqsas/hprof/
W/personal.system(16579): type=1400 audit(0.0:31785): avc: denied { search } for name="mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
W/personal.system(16579): type=1400 audit(0.0:31786): avc: denied { getattr } for path="/data/mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
W/personal.system(16579): type=1400 audit(0.0:31787): avc: denied { search } for name="mqsas" dev="mmcblk0p46" ino=1294337 scontext=u:r:untrusted_app:s0:c46,c257,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.my.ientry.mypersonal.system
I/Process (16579): Sending signal. PID: 16579 SIG: 9
Lost connection to device.

How to fix it yea?

abedputra commented 1 year ago

I think this package conflicts with the geolocator package. When I comment on the geolocator in the .yml file then this app works well.