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

com.mapbox.mapboxsdk.style.sources.CannotAddSourceException: Source already exists #1170

Open
D10NGYANG opened this issue Jan 11, 2021 · 1 comment

Comments

@D10NGYANG
Copy link

when I use MapboxMap in My fragment
2021-01-11 16:05:41.619 14347-14347/com.jinribeidou.hailiao.test E/Mbgl-MapChangeReceiver: Exception in onDidFinishLoadingStyle com.mapbox.mapboxsdk.style.sources.CannotAddSourceException: Source mapbox-android-symbol-source-3 already exists at com.mapbox.mapboxsdk.maps.NativeMapView.nativeAddSource(Native Method) at com.mapbox.mapboxsdk.maps.NativeMapView.addSource(NativeMapView.java:937) at com.mapbox.mapboxsdk.maps.Style.addSource(Style.java:119) at com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager.initializeSourcesAndLayers(AnnotationManager.java:351) at com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager.access$200(AnnotationManager.java:38) at com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager$1$1.onStyleLoaded(AnnotationManager.java:95) at com.mapbox.mapboxsdk.maps.MapboxMap.getStyle(MapboxMap.java:121) at com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager$1.onDidFinishLoadingStyle(AnnotationManager.java:91) at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198) at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1166) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:363) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:8349) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

@D10NGYANG
Copy link
Author

SDK
// MapBox 地图
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v9:0.12.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-offline-v9:0.7.0'

compileSdkVersion 30
buildToolsVersion "30.0.3"

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

No branches or pull requests

1 participant