mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
478 stars 134 forks source link

Compose Preview is broken after updating to 11.6.0 #2464

Closed arun-ns closed 2 weeks ago

arun-ns commented 3 months ago

Environment

After updating version from 11.5.1 to 11.6.0, compose ui preview in android studio is broken. Please check the issue in below

java.lang.UnsatisfiedLinkError: 'void com.mapbox.common.Log.debug(java.lang.String, java.lang.String)'
    at com.mapbox.common.Log.debug(Native Method)
    at com.mapbox.common.MapboxMapsAndroidLogger.internalLogD$sdk_base_release(MapboxMapsAndroidLogger.kt:22)
    at com.mapbox.maps.MapboxLogger.logD(MapboxLogger.kt:28)
    at com.mapbox.maps.extension.compose.MapState$Companion$Saver$1.invoke(MapState.kt:294)
    at com.mapbox.maps.extension.compose.MapState$Companion$Saver$1.invoke(MapState.kt:290)
    at androidx.compose.runtime.saveable.SaverKt$Saver$1.save(Saver.kt:66)
    at androidx.compose.runtime.saveable.SaveableHolder$valueProvider$1.invoke(RememberSaveable.kt:148)
    at androidx.compose.runtime.saveable.SaveableHolder.register(RememberSaveable.kt:182)
    at androidx.compose.runtime.saveable.SaveableHolder.onRemembered(RememberSaveable.kt:193)
    at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1295)
    at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:984)
    at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:1005)
    at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1099)
    at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:633)
    at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:619)
    at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:123)
    at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
    at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1289)
    at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:114)
    at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:164)
    at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
    at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:198)
    at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:121)
    at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
    at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1364)
    at android.view.View.dispatchAttachedToWindow(View.java:21980)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
    at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:44)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:372)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:454)
    at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:120)
    at com.android.tools.rendering.RenderTask.createRenderSession(RenderTask.java:776)
    at com.android.tools.rendering.RenderTask.lambda$inflate$6(RenderTask.java:924)
    at com.android.tools.rendering.RenderExecutor$runAsyncActionWithTimeout$3.run(RenderExecutor.kt:203)
    at com.android.tools.rendering.RenderExecutor$PriorityRunnable.run(RenderExecutor.kt:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

Observed behavior and steps to reproduce

Expected behavior

Notes / preliminary analysis

Additional links and references

natiginfo commented 2 months ago

Thanks for reporting the issue. We will take a look at it.

kiryldz commented 2 weeks ago

This should be fixed in v11.7.1.