Closed miguelflores1993 closed 1 year ago
Can you try to upgrade kotlin_version to '1.7.10' please?
Won't it affect my project in general? other packages?
I don't know your dependencies so can't say for sure. You can probably try it and see if it compiles or not. 1.7.10 is a stable version from July 2022. I think it's safe to use and other dependencies might upgrade later as well.
the application compiles, but closes... emulador
E/AndroidRuntime( 3313): FATAL EXCEPTION: main
E/AndroidRuntime( 3313): Process: com.deltaxlat.appdriver.dev, PID: 3313
E/AndroidRuntime( 3313): java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.ActivityRecognitionClient, but class was expected (declaration of 'com.google.android.gms.location.ActivityRecognitionClient' appears in /data/app/~~ormrqoBzvT3udWou-CEC2g==/com.deltaxlat.appdriver.dev-yP9rUuHd0egpa9ehAF8b0w==/base.apk!classes7.dex)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.service.ActivityRecognitionService.start(Unknown Source:84)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation$n0.a(Unknown Source:16)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig.b(Unknown Source:32)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig.b(Unknown Source:225)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig.b(Unknown Source:0)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig$Builder.commit(Unknown Source:10)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig$Builder.a(Unknown Source:144)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig$Builder.b(Unknown Source:0)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig.reset(Unknown Source:2)
E/AndroidRuntime( 3313): at com.transistorsoft.locationmanager.adapter.TSConfig.reset(Unknown Source:1)
E/AndroidRuntime( 3313): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationModule.ready(BackgroundGeolocationModule.java:365)
E/AndroidRuntime( 3313): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationModule.onMethodCall(BackgroundGeolocationModule.java:222)
E/AndroidRuntime( 3313): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/AndroidRuntime( 3313): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/AndroidRuntime( 3313): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/AndroidRuntime( 3313): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/AndroidRuntime( 3313): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 3313): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3313): at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime( 3313): at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime( 3313): at android.app.ActivityThread.main(ActivityThread.java:7839)
E/AndroidRuntime( 3313): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3313): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime( 3313): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
I realized that if it is affecting a library... that is called flutter_background_geolocation
I think I won't be able to use your library.
I'll take a look at what we can do.
@apalala-dev can this help you? https://github.com/transistorsoft/flutter_background_geolocation/issues/933
Yes I think it's the cause of the problem.
camerawesome
uses Play Services v21+ (hard-coded) while flutter_background_geolocation
uses v20.
The author of flutter_background_geolocation
said that he would release v4.9.0 with v21 as well next week.
Can you wait for that release ?
In the meantime, I'll try to implement gradle variables to let users tell which version they want to use.
I made a PR to let you define which version of Play Services Location you want to use (instead of hard-coding it). Can you try it and tell me it works for you ?
I used the same name as flutter_background_geolocation
, so we should use the same library version.
You should already have the good configuration, but the important part is:
buildscript {
// other stuff
ext {
// other stuff
playServicesLocationVersion = "20.0.0"
}
}
See #234
You can depend on the branch directly in your pubspec.yaml:
dependencies:
camerawesome:
git:
url: https://github.com/Apparence-io/CamerAwesome.git
ref: play_services_location_version
Thank you! I will notify you to implement it again, very kind and fast, the solution is appreciated.
PR #234 which includes a gradle variable for Play Services Location has been merged and should fix this problem. It is available in 1.2.1. I'll close the issue, feel free to tell us if something is still wrong!
I'm with flutter 3.3.10 I use the latest version of cameraawesome 1.2.0 I'm trying to install the library in my project.
the example project of the library if it works well, this is the error that I get.
my build graddle, is the same latest version that is created in the flutter project