Closed flodaniel closed 1 year ago
I managed to resolve it by downgrading the version to 20. Ideally we can upgrade the plugin to work with version 21.
Mhmm... the same issue here, on a different plugin a similar error appeared, where the issue was a rework of the API. See: Lyokone/flutterlocation#810 The link posted there to the Google Blog thing also mentions a rework of the ActivityApi if I read it correctly.
I consider forking it, but my android developer skills are rather limited rn.
I also have the same issue in my project that uses geolocator
and this flutter_activity_recognition
package. In my attempt to solve this issue, I created an entirely new project that contains only example code from flutter_activity_recognition
and it works perfectly fine. Still, as soon as I include geolocator
in my project, it quickly ran into this error on the app startup. That's when I knew there were some incompatibility issues between these 2 packages.
Then, I see this Github Issue, and this solved everything for me.
same error
I've forked it and changed the version code of the native Code and it works for now. You could try using it, by calling it from github directly.
check flutter_activity_recognition: ^2.0.0
I see the following crash as soon as i try to use the plugin:
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.ActivityRecognitionClient, but class was expected (declaration of 'com.google.android.gms.location.ActivityRecognitionClient'
I am running the latest plugin version with these android sdk settings:
Trying to upgrade my google play services location to this, did also not work:
is there any way to resolve this?