Is there known issues with the preview in Dev10 in...
# compose
b
Is there known issues with the preview in Dev10 in the latest canary android studio? I'm getting this error in every method that has a preview annotation:
Copy code
java.lang.NoClassDefFoundError: Could not initialize class kotlinx.coroutines.Dispatchers   at androidx.ui.core.WrappedComposition$setContent$1.invoke(Wrapper.kt:267)   at androidx.ui.core.WrappedComposition$setContent$1.invoke(Wrapper.kt:-1)   at androidx.compose.internal.RestartableFunction.invoke(RestartableFunction.kt:131)   at androidx.compose.internal.RestartableFunction.invoke(RestartableFunction.kt:-1)   at androidx.compose.ComposerKt.invokeComposable(Composer.kt:2106)   at androidx.compose.Recomposer.recompose$compose_runtime_release(Recomposer.kt:67)   at androidx.compose.CompositionImpl.setContent(Composition.kt:120)   at androidx.ui.core.WrappedComposition.setContent(Wrapper.kt:266)   at androidx.ui.core.WrappedComposition$setContent$2.invoke(Wrapper.kt:277)   at androidx.ui.core.WrappedComposition$setContent$2.invoke(Wrapper.kt:-1)   at androidx.ui.core.SavedStateDelegate.stopWaitingForStateRestoration(SavedStateDelegate.kt:84)   at androidx.ui.core.AndroidComposeView.onMeasure_Original(AndroidOwner.kt:455)   at androidx.ui.core.AndroidComposeView.onMeasure(AndroidOwner.kt:-1)   at android.view.View.measure_Original(View.java:24552)   at android.view.View_Delegate.measure(View_Delegate.java:80)   at android.view.View.measure(View.java:24516)   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)   at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)   at android.view.View.measure_Original(View.java:24552)   at android.view.View_Delegate.measure(View_Delegate.java:80)   at android.view.View.measure(View.java:24516)   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)   at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)   at android.view.View.measure_Original(View.java:24552)   at android.view.View_Delegate.measure(View_Delegate.java:80)   at android.view.View.measure(View.java:24516)   at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)   at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:481)   at android.view.View.measure_Original(View.java:24552)   at android.view.View_Delegate.measure(View_Delegate.java:80)   at android.view.View.measure(View.java:24516)   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)   at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)   at android.view.View.measure_Original(View.java:24552)   at android.view.View_Delegate.measure(View_Delegate.java:80)   at android.view.View.measure(View.java:24516) Copy stack to clipboard   Tip: Try to refresh the layout.
The message box says:
Copy code
Rendering errors might be caused by the new Layout Rendering Engine. Disabling it by clicking here may fix the issue. It can later be enabled again using the Settings > Experimental dialog.
When I try that, I get the same error as above but it the message changes to
use the new experimental layout rendering engine
I've tried invalidating my caches and restarting android studio, creating new projects, et cetera
i
heh, circular errors

https://i.kym-cdn.com/entries/icons/mobile/000/023/397/C-658VsXoAo3ovC.jpg

😄 1
j
If you're using coroutines, change it's version to
1.3.0
That worked for me.
👍 1
b
I'll give that a shot
Hmm that didn't work for me 😕