Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapBoxMap causing flutter app crash #1296

Closed
milad-alsabbagh opened this issue Apr 12, 2023 · 10 comments
Closed

mapBoxMap causing flutter app crash #1296

milad-alsabbagh opened this issue Apr 12, 2023 · 10 comments
Labels

Comments

@milad-alsabbagh
Copy link

I used MapBox Api and MapBox-gl package to show map in my flutter app but every thing was ok until I had to update my ext,kotlin-version to 1.8.20 (latest version) it was working fine in 1.6.10 but now when I make myLocationEnabled :true the app crashes and show this errors
E/AndroidRuntime( 2456): FATAL EXCEPTION: main
E/AndroidRuntime( 2456): Process: com.example.salesmate, PID: 2456
E/AndroidRuntime( 2456): 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/com.example.salesmate-Crzx4UqDv2LvaU4s0KqYmQ==/base.apk!classes2.dex)
E/AndroidRuntime( 2456): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:58)
E/AndroidRuntime( 2456): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:26)
E/AndroidRuntime( 2456): at com.mapbox.android.core.location.LocationEngineProxy.requestLocationUpdates(LocationEngineProxy.java:34)
E/AndroidRuntime( 2456): at com.mapbox.mapboxsdk.location.LocationComponent.onLocationLayerStart(LocationComponent.java:1439)
E/AndroidRuntime( 2456): at com.mapbox.mapboxsdk.location.LocationComponent.enableLocationComponent(LocationComponent.java:1568)
E/AndroidRuntime( 2456): at com.mapbox.mapboxsdk.location.LocationComponent.setLocationComponentEnabled(LocationComponent.java:551)
E/AndroidRuntime( 2456): at com.mapbox.mapboxgl.MapboxMapController.enableLocationComponent(MapboxMapController.java:274)
E/AndroidRuntime( 2456): at com.mapbox.mapboxgl.MapboxMapController.updateMyLocationEnabled(MapboxMapController.java:1563)
E/AndroidRuntime( 2456): at com.mapbox.mapboxgl.MapboxMapController.setMyLocationEnabled(MapboxMapController.java:1451)
E/AndroidRuntime( 2456): at com.mapbox.mapboxgl.Convert.interpretMapboxMapOptions(Convert.java:253)
E/AndroidRuntime( 2456): at com.mapbox.mapboxgl.MapboxMapController.onMethodCall(MapboxMapController.java:607)
E/AndroidRuntime( 2456): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
E/AndroidRuntime( 2456): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/AndroidRuntime( 2456): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/AndroidRuntime( 2456): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/AndroidRuntime( 2456): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime( 2456): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2456): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime( 2456): at android.app.ActivityThread.main(ActivityThread.java:7073)
E/AndroidRuntime( 2456): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2456): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime( 2456): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
I/Process ( 2456): Sending signal. PID: 2456 SIG: 9
is there any solution please I am on deadline for project thanks

@mapacheverdugo
Copy link

mapacheverdugo commented Apr 12, 2023

PR #1293 worked for me, just use the GitHub link in pubspec.yaml until a new release of this library comes out

  mapbox_gl:
    git:
      url: https://github.com/flutter-mapbox-gl/maps
      ref: 9eef30d # or master

@milad-alsabbagh
Copy link
Author

thanks for your answer but it doesn't work for me app still crashing before rendering the map

@milad-alsabbagh
Copy link
Author

W/CrashReporter(14597): Root directory doesn't exist
W/ample.salesmat(14597): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (light greylist, reflection)
W/ample.salesmat(14597): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V (light greylist, reflection)
W/ample.salesmat(14597): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
W/ample.salesmat(14597): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
W/ample.salesmat(14597): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
W/ample.salesmat(14597): Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (light greylist, reflection)
I/PlatformViewsController(14597): Hosting view in view hierarchy for platform view: 0
D/mali_winsys(14597): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer(14597): eglCreateWindowSurface = 0x71e6fb8e80, 0x71be410010
V/Mbgl-ConnectivityReceiver(14597): connected - true
E/LocationCollectionCli(14597): 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/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/base.apk!classes2.dex)
I/Mbgl-EGLConfigChooser(14597): In emulator: false
D/mali_winsys(14597): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/Mbgl (14597): {Thread-10}[Android]: MapRenderer::onSurfaceCreated GlyphsRasterizationMode was specified without providing LocalIdeographFontFamily. Switching glyphsRasterizationMode to NoGlyphsRasterizedLocally mode.
I/Mbgl (14597): {Thread-10}[General]: GPU Identifier: Mali-G71
E/Mbgl-MapChangeReceiver(14597): Exception in onDidFinishLoadingStyle
E/Mbgl-MapChangeReceiver(14597): 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/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/base.apk!classes2.dex)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:58)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:26)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.android.core.location.LocationEngineProxy.requestLocationUpdates(LocationEngineProxy.java:34)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.location.LocationComponent.onLocationLayerStart(LocationComponent.java:1439)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.location.LocationComponent.enableLocationComponent(LocationComponent.java:1568)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.location.LocationComponent.setLocationComponentEnabled(LocationComponent.java:551)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxgl.MapboxMapController.enableLocationComponent(MapboxMapController.java:277)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxgl.MapboxMapController.updateMyLocationEnabled(MapboxMapController.java:1782)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxgl.MapboxMapController.access$100(MapboxMapController.java:95)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxgl.MapboxMapController$1.onStyleLoaded(MapboxMapController.java:144)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/Mbgl-MapChangeReceiver(14597): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/Mbgl-MapChangeReceiver(14597): at android.os.MessageQueue.nativePollOnce(Native Method)
E/Mbgl-MapChangeReceiver(14597): at android.os.MessageQueue.next(MessageQueue.java:326)
E/Mbgl-MapChangeReceiver(14597): at android.os.Looper.loop(Looper.java:181)
E/Mbgl-MapChangeReceiver(14597): at android.app.ActivityThread.main(ActivityThread.java:7073)
E/Mbgl-MapChangeReceiver(14597): at java.lang.reflect.Method.invoke(Native Method)
E/Mbgl-MapChangeReceiver(14597): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/Mbgl-MapChangeReceiver(14597): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
W/System.err(14597): 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/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/base.apk!classes2.dex)
W/System.err(14597): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:58)
W/System.err(14597): at com.mapbox.android.core.location.GoogleLocationEngineImpl.requestLocationUpdates(GoogleLocationEngineImpl.java:26)
W/System.err(14597): at com.mapbox.android.core.location.LocationEngineProxy.requestLocationUpdates(LocationEngineProxy.java:34)
W/System.err(14597): at com.mapbox.mapboxsdk.location.LocationComponent.onLocationLayerStart(LocationComponent.java:1439)
W/System.err(14597): at com.mapbox.mapboxsdk.location.LocationComponent.enableLocationComponent(LocationComponent.java:1568)
W/System.err(14597): at com.mapbox.mapboxsdk.location.LocationComponent.setLocationComponentEnabled(LocationComponent.java:551)
W/System.err(14597): at com.mapbox.mapboxgl.MapboxMapController.enableLocationComponent(MapboxMapController.java:277)
W/System.err(14597): at com.mapbox.mapboxgl.MapboxMapController.updateMyLocationEnabled(MapboxMapController.java:1782)
W/System.err(14597): at com.mapbox.mapboxgl.MapboxMapController.access$100(MapboxMapController.java:95)
W/System.err(14597): at com.mapbox.mapboxgl.MapboxMapController$1.onStyleLoaded(MapboxMapController.java:144)
W/System.err(14597): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
W/System.err(14597): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
W/System.err(14597): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
W/System.err(14597): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
W/System.err(14597): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
W/System.err(14597): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(14597): at android.os.MessageQueue.next(MessageQueue.java:326)
W/System.err(14597): at android.os.Looper.loop(Looper.java:181)
W/System.err(14597): at android.app.ActivityThread.main(ActivityThread.java:7073)
W/System.err(14597): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(14597): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
W/System.err(14597): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/libc++abi(14597): terminating with uncaught exception of type jni::PendingJavaException
F/libc (14597): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 14597 (ample.salesmate), pid 14597 (ample.salesmate)


Build fingerprint: 'samsung/greatltexx/greatlte:9/PPR1.180610.011/N950FXXUGDVG5:user/release-keys'
Revision: '9'
ABI: 'arm64'
pid: 14597, tid: 14597, name: ample.salesmate >>> com.example.salesmate <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'terminating with uncaught exception of type jni::PendingJavaException'
x0 0000000000000000 x1 0000000000003905 x2 0000000000000006 x3 0000000000000008
x4 fefeff6d6e68736f x5 fefeff6d6e68736f x6 fefeff6d6e68736f x7 7f7f7f7f7f7f7f7f
x8 0000000000000083 x9 000000726aa3c838 x10 fffffff87ffffbdf x11 0000000000000001
x12 0000000000000018 x13 0000000064372bc0 x14 00158ad963c7a6dc x15 00003ad4658923e4
x16 000000726aa732a0 x17 000000726a9b2920 x18 0000000000000000 x19 0000000000003905
x20 0000000000003905 x21 0000000000000083 x22 ffffff80ffffffc8 x23 0000007fd2ea60a0
x24 0000007fd2ea5f80 x25 0000007fd2ea5fc0 x26 0000007157dce968 x27 0000007157dce960
x28 0000007157dce980 x29 0000007fd2ea5ef0
sp 0000007fd2ea5eb0 lr 000000726a9a5d68 pc 000000726a9a5d94
backtrace:
#00 pc 0000000000021d94 /system/lib64/libc.so (abort+124)
#1 pc 0000000000373aa4 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#2 pc 0000000000373c14 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#3 pc 00000000003711d4 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#4 pc 0000000000370800 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#5 pc 000000000037075c /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so (__cxa_throw+112)
#6 pc 0000000000094680 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#7 pc 00000000000aee88 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#8 pc 0000000000115b8c /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#9 pc 00000000001c3898 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#10 pc 00000000001c3314 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#11 pc 00000000001c5b70 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#12 pc 000000000022177c /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#13 pc 00000000000fb3e0 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#14 pc 000000000021b0c4 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#15 pc 000000000021a930 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#16 pc 000000000021a9fc /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#17 pc 0000000000219c24 /data/app/com.example.salesmate-XAF8MkkHPfrqOjQtIdta1Q==/lib/arm64/libmapbox-gl.so
#18 pc 00000000000144fc /system/lib64/libutils.so (android::Looper::pollInner(int)+836)
#19 pc 0000000000014114 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
#20 pc 000000000012c294 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
#21 pc 0000000000435f8c /system/framework/arm64/boot-framework.oat (offset 0x420000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
#22 pc 000000000000960c /dev/ashmem/dalvik-jit-code-cache_14597_14597 (deleted) (android.os.MessageQueue.next+204)
#23 pc 0000000000562788 /system/lib64/libart.so (art_quick_invoke_stub+584)
#24 pc 00000000000d0140 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#25 pc 00000000002865e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#26 pc 00000000002805a4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#27 pc 00000000005319d8 /system/lib64/libart.so (MterpInvokeVirtual+584)
#28 pc 0000000000554d94 /system/lib64/libart.so (ExecuteMterpImpl+14228)
#29 pc 0000000000c55752 /system/framework/boot-framework.vdex (android.os.Looper.loop+130)
#30 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1209744080+496)
#31 pc 000000000025fc20 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
#32 pc 0000000000280588 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
#33 pc 0000000000532edc /system/lib64/libart.so (MterpInvokeStatic+204)
#34 pc 0000000000554f14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#35 pc 00000000004c0bf0 /system/framework/boot-framework.vdex (android.app.ActivityThread.main+220)
#36 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1209744080+496)
#37 pc 0000000000522118 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#38 pc 000000000056b8fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#39 pc 0000000000562a4c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#40 pc 00000000000d0160 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#41 pc 0000000000468a78 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#42 pc 000000000046a4d0 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
#43 pc 00000000003f8f50 /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
#44 pc 000000000011f7e4 /system/framework/arm64/boot.oat (offset 0x115000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#45 pc 0000000000562788 /system/lib64/libart.so (art_quick_invoke_stub+584)
#46 pc 00000000000d0140 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#47 pc 00000000002865e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#48 pc 00000000002805a4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#49 pc 00000000005319d8 /system/lib64/libart.so (MterpInvokeVirtual+584)
#50 pc 0000000000554d94 /system/lib64/libart.so (ExecuteMterpImpl+14228)
#51 pc 00000000013ba372 /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
#52 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1209744080+496)
#53 pc 0000000000522118 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#54 pc 000000000056b8fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#55 pc 0000000000e17f80 /system/framework/arm64/boot-framework.oat (offset 0x420000) (com.android.internal.os.ZygoteInit.main+2208)
#56 pc 0000000000562a4c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#57 pc 00000000000d0160 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#58 pc 0000000000468a78 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#59 pc 00000000004686d0 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+416)
#60 pc 000000000036ab24 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+644)
#61 pc 00000000000b9d10 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
#62 pc 00000000000bc8d4 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+780)
#63 pc 0000000000004990 /system/bin/app_process64 (main+1200)
#64 pc 00000000000b0540 /system/lib64/libc.so (__libc_init+88)
it shows this errors

@simon-the-shark
Copy link

Hello guys,
I’ve been dealing with this error as well and from what I’ve researched it’s a known error associated with api change in play-services-location: https://issuetracker.google.com/issues/256046114?hl=pl

You probably need to dig into these dependencies and I suspect there might be some conflict with the flutter geolocation package since these packages are highly probable to be used in combination. Their similar issue: Baseflow/flutter-geolocator#1214

What I can offer for all folks out there is workaround that worked for me:

Add this code to allprojects { repositories in build.gradle

configurations.all {
           resolutionStrategy {
               force "com.google.android.gms:play-services-location:20.0.0"
           }
        }

Workaround:

// rest of the `build.gradle`

allprojects {
    repositories {
        google()
        jcenter()
        // added this line
        configurations.all {
           resolutionStrategy {
               force "com.google.android.gms:play-services-location:20.0.0"
           }
        }
    }
}

// rest of the `build.gradle`

My dependencies:

Flutter: Flutter (Channel stable, 3.7.10, on macOS 13.1 22C65 darwin-arm64, locale pl-PL)
mapbox_gl: ^0.16.0
geolocator: ^9.0.2

@SkilyFrance
Copy link

PR #1293 worked for me, just use the GitHub link in pubspec.yaml until a new release of this library comes out

  mapbox_gl:
    git:
      url: https://github.com/flutter-mapbox-gl/maps
      ref: 9eef30d # or master

It fixes my issue, thanks for it !

@stale
Copy link

stale bot commented Aug 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 7, 2023
@stale stale bot closed this as completed Aug 15, 2023
This was referenced Aug 30, 2023
@phuclh1406
Copy link

Hello guys, I’ve been dealing with this error as well and from what I’ve researched it’s a known error associated with api change in play-services-location: https://issuetracker.google.com/issues/256046114?hl=pl

You probably need to dig into these dependencies and I suspect there might be some conflict with the flutter geolocation package since these packages are highly probable to be used in combination. Their similar issue: Baseflow/flutter-geolocator#1214

What I can offer for all folks out there is workaround that worked for me:

Add this code to allprojects { repositories in build.gradle

configurations.all {
           resolutionStrategy {
               force "com.google.android.gms:play-services-location:20.0.0"
           }
        }

Workaround:

// rest of the `build.gradle`

allprojects {
    repositories {
        google()
        jcenter()
        // added this line
        configurations.all {
           resolutionStrategy {
               force "com.google.android.gms:play-services-location:20.0.0"
           }
        }
    }
}

// rest of the `build.gradle`

My dependencies:

Flutter: Flutter (Channel stable, 3.7.10, on macOS 13.1 22C65 darwin-arm64, locale pl-PL)
mapbox_gl: ^0.16.0
geolocator: ^9.0.2

This work for me! Thanks alot

@wwyung
Copy link

wwyung commented Nov 25, 2023

I tried force com.google.android.gms:play-services-location:20.0.0, and change mapbox_gl to 0.16.0, geolocator to 9.0.2, when I build my app, it gave the following error:

C:\Users\winso\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.4.0\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:91: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
C:\Users\winso\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.4.0\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:91: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
2 errors

@nzackoya
Copy link

nzackoya commented Dec 5, 2023

Why downgrading is a solution to close this issue?

@Damithedev
Copy link

How far make person drop solution i wan die client they collect am next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants