I'm trying to import turn by turn mapBox navigation in my flutter app. I'm following this sample for achieving the desired navigation but it gives error when i run it:
But when i try to execute the navigation, I'm getting this error:
E/MapboxModuleProvider(30785): Module loading failed
E/MapboxModuleProvider(30785): java.lang.NoSuchMethodException: com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.<init> []
E/MapboxModuleProvider(30785): at java.lang.Class.getConstructor0(Class.java:2363)
E/MapboxModuleProvider(30785): at java.lang.Class.getConstructor(Class.java:1759)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider$noArgConstructorCreator$1.getInstance(MapboxModuleProvider.kt:107)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
E/MapboxModuleProvider(30785): at android.os.Looper.loopOnce(Looper.java:179)
E/MapboxModuleProvider(30785): at android.os.Looper.loop(Looper.java:344)
E/MapboxModuleProvider(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
E/MapboxModuleProvider(30785): at java.lang.reflect.Method.invoke(Native Method)
E/MapboxModuleProvider(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
E/MapboxModuleProvider(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
E/MapboxModuleProvider(30785): Module loading failed
E/MapboxModuleProvider(30785): java.lang.NoSuchFieldException: INSTANCE
E/MapboxModuleProvider(30785): at java.lang.Class.getField(Class.java:1635)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider$kotlinObjectReferenceProvider$1.getInstance(MapboxModuleProvider.kt:117)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
E/MapboxModuleProvider(30785): at android.os.Looper.loopOnce(Looper.java:179)
E/MapboxModuleProvider(30785): at android.os.Looper.loop(Looper.java:344)
E/MapboxModuleProvider(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
E/MapboxModuleProvider(30785): at java.lang.reflect.Method.invoke(Native Method)
E/MapboxModuleProvider(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
E/MapboxModuleProvider(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
E/MapboxModuleProvider(30785): Module loading failed
E/MapboxModuleProvider(30785): java.lang.NoSuchMethodException: com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.getInstance []
E/MapboxModuleProvider(30785): at java.lang.Class.getMethod(Class.java:2103)
E/MapboxModuleProvider(30785): at java.lang.Class.getMethod(Class.java:1724)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider$singletonReferenceProvider$1.getInstance(MapboxModuleProvider.kt:126)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
E/MapboxModuleProvider(30785): at android.os.Looper.loopOnce(Looper.java:179)
E/MapboxModuleProvider(30785): at android.os.Looper.loop(Looper.java:344)
E/MapboxModuleProvider(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
E/MapboxModuleProvider(30785): at java.lang.reflect.Method.invoke(Native Method)
E/MapboxModuleProvider(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
E/MapboxModuleProvider(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
E/MapboxModuleProvider(30785): Module loading failed
E/MapboxModuleProvider(30785): java.lang.reflect.InvocationTargetException
E/MapboxModuleProvider(30785): at java.lang.reflect.Constructor.newInstance0(Native Method)
E/MapboxModuleProvider(30785): at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider$defaultMapboxModuleCreator$1.getInstance(MapboxModuleProvider.kt:138)
E/MapboxModuleProvider(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:69)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
E/MapboxModuleProvider(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/MapboxModuleProvider(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MapboxModuleProvider(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
E/MapboxModuleProvider(30785): at android.os.Looper.loopOnce(Looper.java:179)
E/MapboxModuleProvider(30785): at android.os.Looper.loop(Looper.java:344)
E/MapboxModuleProvider(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
E/MapboxModuleProvider(30785): at java.lang.reflect.Method.invoke(Native Method)
E/MapboxModuleProvider(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
E/MapboxModuleProvider(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
E/MapboxModuleProvider(30785): Caused by: java.lang.IllegalArgumentException: it.sistematica.coride: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/MapboxModuleProvider(30785): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E/MapboxModuleProvider(30785): at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/MapboxModuleProvider(30785): at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:464)
E/MapboxModuleProvider(30785): at android.app.PendingIntent.getActivity(PendingIntent.java:444)
E/MapboxModuleProvider(30785): at android.app.PendingIntent.getActivity(PendingIntent.java:408)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.createPendingOpenIntent(MapboxTripNotification.kt:275)
E/MapboxModuleProvider(30785): at com.mapbox.navigation.trip.notification.internal.MapboxTripNotification.<init>(MapboxTripNotification.kt:112)
E/MapboxModuleProvider(30785): ... 24 more
E/Mbgl-MapChangeReceiver(30785): Exception in onDidFinishLoadingStyle
E/Mbgl-MapChangeReceiver(30785): MapboxInvalidModuleException(type=NavigationTripNotification)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:88)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
E/Mbgl-MapChangeReceiver(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
E/Mbgl-MapChangeReceiver(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
E/Mbgl-MapChangeReceiver(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
E/Mbgl-MapChangeReceiver(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
E/Mbgl-MapChangeReceiver(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
E/Mbgl-MapChangeReceiver(30785): at android.os.Looper.loopOnce(Looper.java:179)
E/Mbgl-MapChangeReceiver(30785): at android.os.Looper.loop(Looper.java:344)
E/Mbgl-MapChangeReceiver(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
E/Mbgl-MapChangeReceiver(30785): at java.lang.reflect.Method.invoke(Native Method)
E/Mbgl-MapChangeReceiver(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
E/Mbgl-MapChangeReceiver(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
W/System.err(30785): MapboxInvalidModuleException(type=NavigationTripNotification)
W/System.err(30785): at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(MapboxModuleProvider.kt:88)
W/System.err(30785): at com.mapbox.navigation.core.MapboxNavigation.<init>(MapboxNavigation.kt:179)
W/System.err(30785): at com.mapbox.navigation.core.MapboxNavigationProvider.create(MapboxNavigationProvider.kt:23)
W/System.err(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.fetchRoute(NavigationActivity.kt:107)
W/System.err(30785): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onNavigationReady(NavigationActivity.kt:94)
W/System.err(30785): at com.mapbox.navigation.ui.NavigationView.updateNavigationReadyListeners(NavigationView.java:653)
W/System.err(30785): at com.mapbox.navigation.ui.NavigationView.access$700(NavigationView.java:75)
W/System.err(30785): at com.mapbox.navigation.ui.NavigationView$1.onStyleLoaded(NavigationView.java:247)
W/System.err(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:963)
W/System.err(30785): at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:225)
W/System.err(30785): at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1383)
W/System.err(30785): at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
W/System.err(30785): at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166)
W/System.err(30785): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(30785): at android.os.MessageQueue.next(MessageQueue.java:339)
W/System.err(30785): at android.os.Looper.loopOnce(Looper.java:179)
W/System.err(30785): at android.os.Looper.loop(Looper.java:344)
W/System.err(30785): at android.app.ActivityThread.main(ActivityThread.java:8248)
W/System.err(30785): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(30785): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
W/System.err(30785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
E/libc++abi(30785): terminating with uncaught exception of type jni::PendingJavaException
F/libc (30785): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 30785 (tematica.coride), pid 30785 (tematica.coride)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'OPPO/CPH2273EEA/OP4F97:12/SP1A.210812.016/R.202209022301:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-12-05 12:43:33.054383583+0100
Process uptime: 0s
Cmdline: it.sistematica.coride
pid: 30785, tid: 30785, name: tematica.coride >>> it.sistematica.coride <<<
uid: 10000
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'terminating with uncaught exception of type jni::PendingJavaException'
x0 0000000000000000 x1 0000000000007841 x2 0000000000000006 x3 0000007ff8d27830
x4 736f646277641f73 x5 736f646277641f73 x6 736f646277641f73 x7 7f7f7f7f7f7f7f7f
x8 00000000000000f0 x9 00000077998682c0 x10 ffffff00fffffbdf x11 0000000000000001
x12 0000000000232a3a x13 00000019bb91d520 x14 00321163fa4d57a0 x15 000000004cec4ec5
x16 000000779992cbb0 x17 0000007799908450 x18 00000077a30a0000 x19 00000000000000ac
x20 0000000000007841 x21 00000000000000b2 x22 0000000000007841 x23 00000000ffffffff
x24 0000007ff8d27970 x25 0000007ff8d279b0 x26 000000764f7bf968 x27 000000764f7bf960
x28 000000764f7bf980 x29 0000007ff8d278b0
lr 00000077998b9b6c sp 0000007ff8d27810 pc 00000077998b9b9c pst 0000000000000000
backtrace:
#00 pc 0000000000078b9c /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: f24f65acf653c409ca4332aced817a71)
#01 pc 0000000000373aa4 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#02 pc 0000000000373c14 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#03 pc 00000000003711d4 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#04 pc 0000000000370800 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#05 pc 000000000037075c /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (__cxa_throw+112) (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#06 pc 0000000000094680 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#07 pc 00000000000aee88 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#08 pc 0000000000115b8c /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#09 pc 00000000001c3898 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#10 pc 00000000001c3314 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#11 pc 00000000001c5b70 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#12 pc 000000000022177c /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#13 pc 00000000000fb3e0 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#14 pc 000000000021b0c4 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#15 pc 000000000021a930 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#16 pc 000000000021a9fc /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#17 pc 0000000000219c24 /data/app/~~c1v49E5YOUU4cpsgsZkXMA==/it.sistematica.coride-dE8WRurv1omhuSOzQwOqGg==/lib/arm64/libmapbox-gl.so (BuildId: 5340fab4c92fd87f8304775de4bc95627e863fd7)
#18 pc 0000000000016bb0 /system/lib64/libutils.so (android::Looper::pollInner(int)+912) (BuildId: 0c269320029489b4040b2307f9282499)
#19 pc 00000000000167b8 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 0c269320029489b4040b2307f9282499)
#20 pc 000000000014d19c /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: f58022602a4be6b7ee457879f2b1e56f)
#21 pc 00000000001b542c /system/framework/arm64/boot-framework.oat (art_jni_trampoline+108) (BuildId: 8e7b80fce423e4224a2848a1fa52e8ed4313c088)
#22 pc 0000000002006d0c /memfd:jit-cache (deleted) (android.os.MessageQueue.next+204)
#23 pc 0000000002008f48 /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+168)
My pubspec.yaml
name: codrive_flutter
description: Codrive with flutter framework
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.5.0
environment:
sdk: ">=2.16.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_mapbox_navigation: ^0.0.25
shared_preferences: ^2.0.13
flutter_native_splash: ^2.0.4
location: ^4.4.0
google_fonts: ^2.3.1
flutter_dotenv: ^5.0.2
dio: ^4.0.4
mapbox_gl: ^0.15.0
intl: ^0.17.0
flutter_rating_bar: ^4.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter_launcher_icons: ^0.9.2
flutter_intl:
enabled: true
My build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "it.sistematica.coride"
minSdkVersion 21
targetSdkVersion 31
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
configurations {
all*.exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-telemetry'
}
Any suggestions about how to solve this problem?
This issue was fixed in native Android version of mapbox SDK
The flutter library is not maintained properly, but my guess if you use the latest version
0.26
it will workThere is a lot of changes to Android in this version
if not, try to change mapbox version from android build gradle file manually, until it works for you