Status Update
Comments
jb...@google.com <jb...@google.com>
jg...@google.com <jg...@google.com>
am...@google.com <am...@google.com> #2
Could we get an official response to this feature request? Is there an idea to support SafeArgs in navigation-compose one day? Not asking for any time frames. Maybe there is no plans for statically generated args for navigation-compose at all.
yg...@gmail.com <yg...@gmail.com> #3
Part 1-
Part 2-
Github repo-
yg...@gmail.com <yg...@gmail.com> #5
+1
am...@google.com <am...@google.com> #6
this library make it super easy if can you support this on the native way
yg...@gmail.com <yg...@gmail.com> #7
Here's a library that does just this:
jo...@olavstoppen.no <jo...@olavstoppen.no> #8
something similar to 'compose-destinations' should be officially available to the devs. Its a pain to manage all the parameters manually.
Currently, I am working with a custom NavType implementation with Gson.
yg...@gmail.com <yg...@gmail.com> #9
am...@google.com <am...@google.com> #10
Google team are there any news/priorities on this? Are you planning on improve the existing compose-navigation lib or this is going to not feasible😉?
ey...@gmail.com <ey...@gmail.com> #12
Re navigate
calls) from @Serializable
classes.
There's a lot of parts to this, so please bear with us. We'll make sure to write a public blog post explaining much of the reasoning and other alternatives we looked into when we're ready to make a public release.
yg...@gmail.com <yg...@gmail.com> #13
Branch: androidx-main
commit 5dc21cddd069edef368db19f15abc97388a429f2
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 21 09:59:02 2024
Implement routePattern generator for Serializable type T
Generate routePattern for type T where T is a concrete serializable class or object.
Args with default values are appended as query parameters, while args without are appended as path parameters.
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: Ie8527e46e31881747b3599a96d17a15019ea8305
M navigation/navigation-common/build.gradle
A navigation/navigation-common/src/main/java/androidx/navigation/serialization/RouteSerializer.kt
A navigation/navigation-common/src/test/java/androidx/navigation/serialization/RoutePatternTest.kt
M navigation/navigation-fragment/build.gradle
am...@google.com <am...@google.com> #14
Branch: androidx-main
commit 590af4206ee5798f3319f5df7c7dae6712753683
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 21 11:44:18 2024
Implement KType argument matcher
Users can provide custom NavTypes via Map<KType, NavType<*>>. We map serialized arguments to NavType by matching the serialized arg to a KType.
Matching is performed by first converting both serialized arg and KType to a common internal type, and then comparing the resulting internal type. KTypes can have different names for the same Type, i.e. Int can be represented as "int" and "java.lang.Integer" depending on factors such as its nullability, whether it is a TypeParameter etc. Therefore, conversion to a common type enables easier matching for different permutations of KType names especially with nested TypeParameters.
The matcher recursively matches nested TypeParameters for Native Kotlin collections. For custom Types, TypeParameters are erased in serialization by default. The type is preserved only if a class field is of type T, and even then we cannot know if this type is in fact the TypeParameter. Therefore, matching custom types with TypeParameter<T> only works under two conditions:
1. A class field of that type must be declared for each generic type
2. These class fields must be declared in primary constructor in same order
Otherwise, custom types with TypeParameter will be matched to a KType purely based on the class's fully qualified name and will not be able to differentiate between diffrent TypeParameters values. This can lead to indeterminate matching behavior.
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: I33778e21a36aeca629a3e03d809fa3fef9e8886c
A navigation/navigation-common/src/main/java/androidx/navigation/serialization/NavTypeConverter.kt
A navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavTypeConverterTest.kt
am...@google.com <am...@google.com> #15
Branch: androidx-main
commit 93d3a79b6b53cac22410623ad4239bc5e452e0d9
Author: Clara Fok <clarafok@google.com>
Date: Thu Feb 22 18:13:03 2024
Extract common logic for parsing Serializable and Parcelable NavTypes
To be shared by NavTypeConverter in Safe Args in following implementations.
Test: existing tests
Bug: 188693139
Change-Id: I3446381ef7ab0cd3dc2f245f17e6317b97f336ab
M navigation/navigation-common/src/main/java/androidx/navigation/NavType.kt
fo...@gmail.com <fo...@gmail.com> #16
Branch: androidx-main
commit fa9aa0f0fd5f53a13787fb8b3c51c53835ebd75c
Author: Clara Fok <clarafok@google.com>
Date: Thu Feb 22 18:53:57 2024
Add function to get NavType from a serialized argument
There are two ways with which Safe Args can get NavType from a serialized argument:
1. retrieve from user-provided NavType map (aosp/2972399)
2. auto-generate NavType based on serialized type
This CL impements the second functionality. We currently only support auto-generation of official NavTypes declared in NavType.kt. Other types will cause IllegalArgumentException (as they should be provided in NavType map).
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: I2a96e72c70dbe39eed9d5e3b30fe19c3e1a73014
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/NavTypeConverter.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavTypeConverterTest.kt
bo...@gmail.com <bo...@gmail.com> #17
Branch: androidx-main
commit 39365ca3334bf8ed6fe99c4a609974ea1128c0a2
Author: Clara Fok <clarafok@google.com>
Date: Thu Feb 22 18:12:22 2024
Add internal API to set defaultValuePresent for NavArgument
The defaultValuePresent usually defaults to false, and is set to true when setDefaultValue() is explicitly called. In safe arg's case, serialization tells us whether a default value is present, but does not let us access actual default value (deliberate choice by JB, see
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Change-Id: I76ecb93107081521b7a70d2a6762562b0af7cb8c
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavArgumentTest.kt
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDestinationBuilderTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavArgument.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestinationBuilder.kt
mo...@gmail.com <mo...@gmail.com> #18
Branch: androidx-main
commit ce1fc9aa4bf5cfa1f16cdf8dcc2981a1a7768f6c
Author: Clara Fok <clarafok@google.com>
Date: Thu Feb 22 19:00:19 2024
Implement NavArgument generator
Generates a list of NamedNavArgument from a serializer<T> where T is a serializable concerete class or object.
To convert arg types that are not natively supported by NavType, a map of arg KType to custom NavType is required. The custom NavTypes takes precedence over native NavTypes. For example, a custom NavType<Int> will be used for Int types instead of the official NavType.IntType.
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: I8043f09cead18c3874f1062427180e37be43f510
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/RouteSerializer.kt
A navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavArgumentGeneratorTest.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/RoutePatternTest.kt
am...@google.com <am...@google.com> #19
Branch: androidx-main
commit 09c8c5dafbf2fb7ac52588eecb0d0c229237bc47
Author: Clara Fok <clarafok@google.com>
Date: Tue Feb 27 10:38:05 2024
Change criteria for path arg
Previously the criteria for path arg is that it is not optional (does not have a defualt value).
Now the conditions are:
1. is primitive - because arrays need repeated arg names & custom classes need to be parsed to json string
2. not optional (unchanged from before)
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: Iaa495e742cea666a7616f71b40961fc86aa76663
M navigation/navigation-common/src/main/java/androidx/navigation/NavType.kt
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/RouteSerializer.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/RoutePatternTest.kt
ab...@lunar.app <ab...@lunar.app> #20
Branch: androidx-main
commit c044f2efeeb6fcdbae43bb2413251c41ca3d437d
Author: Clara Fok <clarafok@google.com>
Date: Tue Feb 27 10:35:25 2024
NavTypeConverter to return UNKNOWN instead of throw
Instead of throwing IllegalArgumentException, the converter that converts a serialized argument to a NavType will now return type UNKNOWN. This allows more elegant handling of custom argument types in different use cases.
Test: ./gradlew navigation:navigation-common:test
Bug: 188693139
Change-Id: I9821dc35bbacb384e9b57b45011fcb801af32ce6
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/NavTypeConverter.kt
M navigation/navigation-common/src/test/java/androidx/navigation/serialization/NavTypeConverterTest.kt
jg...@google.com <jg...@google.com>
pa...@wewell.app <pa...@wewell.app> #21
Branch: androidx-main
commit d1e16c5abced31a3738c9686121f3a2a50c3404e
Author: Clara Fok <clarafok@google.com>
Date: Mon Feb 26 12:18:38 2024
Fix startDestination route args not processed
Filled-in arguments in the route that is passed as a NavGraph's startDestination will now be processed and stored in the bundle.
These start route arguments will overwrite default values but not the others. The priority of args is as follows:
Restored/StartDestinationArgs > Start route args > Default args
Relnote: "You can now pass arguments to NavGraph's startDestination directly in the startDestination route without relying on defaultValue. This applies to nesteded NavGraph startDestinations as well."
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 109505019
Bug: 188693139
Change-Id: I0e0b5a7c2bf2e77a8d7a46c91974509104e742a9
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraphNavigator.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
am...@google.com <am...@google.com> #22
Branch: androidx-main
commit f17fc42c5e8bfb01d99d969cb9412ca0d924e170
Author: Clara Fok <clarafok@google.com>
Date: Thu Mar 07 16:47:59 2024
New abstract CollectionNavType
CollectionNavType<T> is a subclass of NavType<T> for collection-based argument such as list, arrays etc. CollectionNavType has an abstract serializeAsValues method to convert a collection into a List of Strings.
Test: ./gradlew navigation: navigation-common:test
Bug: 188693139
Relnote: "Added new abstract CollectionNavType<T> class, a subclass of NavType<T> for collection-based argument such as list, arrays, maps."
Change-Id: Ic6d63bfaf44a35708e63a091265a84f339579e78
M navigation/navigation-common/api/current.txt
M navigation/navigation-common/api/restricted_current.txt
A navigation/navigation-common/src/main/java/androidx/navigation/CollectionNavType.kt
ku...@google.com <ku...@google.com>
ke...@gmail.com <ke...@gmail.com> #23
Branch: androidx-main
commit 3ed84c81fc55312598466f6bbb7b9b14ef428d51
Author: Clara Fok <clarafok@google.com>
Date: Mon Mar 11 10:58:11 2024
Change NavType arrays to CollectionNavType
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Relnote: "NavType built-in arrays such as IntArray are now of type CollectionNavType"
Change-Id: Idcf796fd63e0ef2fc17cf40ccee98ac64c3b6641
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavTypeTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavType.kt
de...@gmail.com <de...@gmail.com> #24
Branch: androidx-main
commit 4fc57246f3ff5701c6fd65defc75ccaff72b4a3b
Author: Clara Fok <clarafok@google.com>
Date: Tue Mar 12 14:14:19 2024
Add NavDestinationBuilder constructor
Add a secondary constrcutor to create destinations with Safe Args by taking the serializable KClass<*> of the destination as the route.
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Relnote: "NavDestinationBuilder can now take a serializble KClass as route to create NavDestinations with type safety"
Change-Id: Ia3fa2b29c0515b02313620c88645d89d379b8636
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavDestinationBuilderTest.kt
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphBuilderTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestinationBuilder.kt
[Deleted User] <[Deleted User]> #25
Branch: androidx-main
commit f40ccd7bec429fd545517778317426f26c42d11f
Author: Clara Fok <clarafok@google.com>
Date: Wed Mar 13 16:16:38 2024
Refactor NavGraph#findNode
findNode for routes need to handle both routePatterns and routeFilled. It used to match routePattern by converting route to an id and matching based on id. But it assumes that the id is always a hashCode of route. This is no longer the case with Safe Args where id can be based on serializer. Now we directly match the string value of routes.
This allows safe args to use route-based APIs that delegates to findNode, such as NavGraph#contains.
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Change-Id: I0eb9b9427aa4e2beb45c7bdae0a5939d34bedf14
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphBuilderTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.kt
am...@google.com <am...@google.com> #26
Branch: androidx-main
commit bd9d02ba729a30e59f91382105dcd9aff66312db
Author: Clara Fok <clarafok@google.com>
Date: Wed Mar 13 18:30:45 2024
Add NavGraph API to set startDestination via KClass
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Relnote: "Added new NavGraph#setStartDestination API that takes a serializable KClass as startDestination"
Change-Id: I35990712aac099ab47f86ca10af8d8886aca5327
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.kt
an...@google.com <an...@google.com> #27
Branch: androidx-main
commit d919d00291d64e342afb3b3babe02a4993ef04a4
Author: Clara Fok <clarafok@google.com>
Date: Wed Mar 13 17:25:22 2024
NavGraphBuilder adds support for KClass as startDestination
Add a secondary constrcutor that takes a serializable KClass<*> as startDestination, as well as DSL methods to create a NavGraph / nested NavGraph from KClass.
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Relnote: "NavGraphBuilder can now take a serializable KClass as startDestination. The starting NavDestination must have been added as a KClass in order to match."
Change-Id: I7de995f0621e397de971a943fcf97b6f3fe9f566
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphBuilderTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestinationBuilder.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraphBuilder.kt
ke...@gmail.com <ke...@gmail.com> #28
Branch: androidx-main
commit 612677ffe8a21225cef35a828d7e277e9d109daf
Author: Clara Fok <clarafok@google.com>
Date: Fri Mar 15 14:54:15 2024
Add NavGraph API to set startDestination via destination object
Add API to set the startDestination of a NavGraph with a destination object T. Calling this method will also set the id based on the object's serializer hashcode.
Test: ./gradlew navigation:navigation-common:cC
Bug: 188693139
Relnote: "Added new NavGraph#setStartDestination API that takes a serializable object as startDestination"
Change-Id: I262aa2eeccc792ae6c1c5b70e6b3d82eed3a3049
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphTest.kt
M navigation/navigation-common/src/androidTest/java/androidx/navigation/serialization/RouteFilledTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.kt
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/RouteEncoder.kt
M navigation/navigation-common/src/main/java/androidx/navigation/serialization/RouteSerializer.kt
Description
1. Describe the bug or issue that you're seeing.
I receive this error while previewing screens using AS Iguana:
```
There was problem to load the PreviewParameterProvider defined. Please double-check its constructor and the values property implementation. The IDE logs should contain the full exception stack trace.
```
checking the logs:
```
2023-11-01 10:37:13,608 [1159285] WARN - #com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager - io.velky.pocket.photo.details.ui.preview.PhotoDetailsDataProvider.$FailToLoadPreviewParameterProvider
java.lang.NoSuchMethodException: io.velky.pocket.photo.details.ui.preview.PhotoDetailsDataProvider.$FailToLoadPreviewParameterProvider
at androidx.compose.ui.tooling.ComposableInvoker.findComposableMethod(ComposableInvoker.kt:91)
at androidx.compose.ui.tooling.ComposableInvoker.invokeComposable(ComposableInvoker.kt:198)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:509)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:507)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:544)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:502)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.tooling.InspectableKt.Inspectable(Inspectable.kt:61)
at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:449)
at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:448)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.tooling.ComposeViewAdapter.WrapPreview(ComposeViewAdapter.kt:443)
at androidx.compose.ui.tooling.ComposeViewAdapter.access$WrapPreview(ComposeViewAdapter.kt:127)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:502)
at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:499)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:195)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:158)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:157)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:157)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:142)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3340)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3273)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:588)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1013)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:183)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1266)
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:42)
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:122)
at com.android.tools.rendering.RenderTask.createRenderSession(RenderTask.java:751)
at com.android.tools.rendering.RenderTask.lambda$inflate$7(RenderTask.java:899)
at com.android.tools.rendering.RenderExecutor$runAsyncActionWithTimeout$3.run(RenderExecutor.kt:202)
at com.android.tools.rendering.RenderExecutor$PriorityRunnable.run(RenderExecutor.kt:316)
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)
````
2. Attach log files from Android Studio
2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option.
2B. Create a diagnostic report and save it to your local computer.
2C. Attach the report to this bug using the Add attachments button.
3. If you know what they are, write the steps to reproduce:
3A.
3B.
3C.
In addition to logs, please attach a screenshot or recording that illustrates the problem.
For more information on how to get your bug routed quickly, see
Build: AI-232.10072.27.2321.11006994, 202310260432
AI-232.10072.27.2321.11006994, JRE 17.0.8+0-17.0.8b1000.22-10799086x64 JetBrains s.r.o., OS Mac OS X(aarch64) v13.5.2, screens 3456.0x2234.0, 1440.0x2560.0, 2560.0x1440.0
AS: Iguana | 2023.2.1 Canary 11
Kotlin plugin: 232-1.9.0-release-358-AS10072.27.2321.11006994
Android Gradle Plugin: 8.1.2
Gradle: 8.2
Gradle JDK: JetBrains Runtime version 17.0.8
NDK: from local.properties: (not specified), latest from SDK: 21.4.7075529
CMake: from local.properties: (not specified), latest from SDK: 3.22.1-g37088a8, from PATH: 3.10.2
```