Kotlin/Compose NavHost Navigation - Compilations errors if i remove a log.d statement in composables #142064
Replies: 1 comment
-
I close the discussion since it seems it was a bug (what I think it was). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Good morning everyone,
I’m currently developing a kotlin/compose mobile app and i’m completely lost with the error i got.
My app works fine and i’m trying to clean up my code (removing logs, and things i tried but don’t use and so on).
I’m using NavHost with different composables
as you can see in the latest composable in the end I’m not using productCode.
I wanted then to delete
Log.d("ProductCode", productCode)
However when i compile just after doing that I got a lot of compilations errors :
1 ) Unresolved references “market” pointing out all the import
Unresolved Reference ProductScreenerViewModel, MarketScreenViewModel pointing out
MarketApp composable (where the previous code is)
2 ) Unresolved Reference ProductScreenerScreen, TopBarMarketScreen, ProductListScreen
pointing out the corresponding calls in the navHost composables.
3 ) Type mismatch: inferred type is NavBackStackEntry but String was expected.
It seems it points out the "it"
`
//TopBarProductScreen
`
4 ) Cannot infer a type for this parameter. Please specify it explicitly.
on all parameters sortOrderState, productCode, productName
Please someone could explain me why i got this error which seems to be incredible to me.
In the end i’m just trying to remove the log.d statement.
I got the issue if I try to comment/remove any of the Log.d lines :
Log.d("ProductCode", productCode) Log.d("Composable", "ProductInfoScreen - ProductList") Log.d("onProductCardClick", productCode)
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions