3
votes

I was using Android Studio Canary 12 for Jetpack compose practice and everything was working correctly but recently i updated to canary 13 and also updated compose version to latest i.e alpha04 and other dependencies as well accordingly. Now when i try Ctrl and hover over default composable functions most of them do not get highlighted, also when i Ctrl + click to see method implementation it shows as below. What is this issue am i doing something wrong?

package androidx.compose.foundation

private val TextStyleAmbient: androidx.compose.runtime.ProvidableAmbient<androidx.compose.ui.text.TextStyle> /* compiled code */

@androidx.compose.runtime.Composable public fun ProvideTextStyle(value: androidx.compose.ui.text.TextStyle, children: @androidx.compose.runtime.Composable() () -> kotlin.Unit): kotlin.Unit { /* compiled code */ }

@androidx.compose.runtime.Composable public fun Text(text: androidx.compose.ui.text.AnnotatedString, modifier: androidx.compose.ui.Modifier /* = compiled code */, color: androidx.compose.ui.graphics.Color /* = compiled code */, fontSize: androidx.compose.ui.unit.TextUnit /* = compiled code */, fontStyle: androidx.compose.ui.text.font.FontStyle? /* = compiled code */, fontWeight: androidx.compose.ui.text.font.FontWeight? /* = compiled code */, fontFamily: androidx.compose.ui.text.font.FontFamily? /* = compiled code */, letterSpacing: androidx.compose.ui.unit.TextUnit /* = compiled code */, textDecoration: androidx.compose.ui.text.style.TextDecoration? /* = compiled code */, textAlign: androidx.compose.ui.text.style.TextAlign? /* = compiled code */, lineHeight: androidx.compose.ui.unit.TextUnit /* = compiled code */, overflow: androidx.compose.ui.text.style.TextOverflow /* = compiled code */, softWrap: kotlin.Boolean /* = compiled code */, maxLines: kotlin.Int /* = compiled code */, inlineContent: kotlin.collections.Map<kotlin.String, androidx.compose.foundation.text.InlineTextContent> /* = compiled code */, onTextLayout: (androidx.compose.ui.text.TextLayoutResult) -> kotlin.Unit /* = compiled code */, style: androidx.compose.ui.text.TextStyle /* = compiled code */): kotlin.Unit { /* compiled code */ }

@androidx.compose.runtime.Composable public fun Text(text: kotlin.String, modifier: androidx.compose.ui.Modifier /* = compiled code */, color: androidx.compose.ui.graphics.Color /* = compiled code */, fontSize: androidx.compose.ui.unit.TextUnit /* = compiled code */, fontStyle: androidx.compose.ui.text.font.FontStyle? /* = compiled code */, fontWeight: androidx.compose.ui.text.font.FontWeight? /* = compiled code */, fontFamily: androidx.compose.ui.text.font.FontFamily? /* = compiled code */, letterSpacing: androidx.compose.ui.unit.TextUnit /* = compiled code */, textDecoration: androidx.compose.ui.text.style.TextDecoration? /* = compiled code */, textAlign: androidx.compose.ui.text.style.TextAlign? /* = compiled code */, lineHeight: androidx.compose.ui.unit.TextUnit /* = compiled code */, overflow: androidx.compose.ui.text.style.TextOverflow /* = compiled code */, softWrap: kotlin.Boolean /* = compiled code */, maxLines: kotlin.Int /* = compiled code */, onTextLayout: (androidx.compose.ui.text.TextLayoutResult) -> kotlin.Unit /* = compiled code */, style: androidx.compose.ui.text.TextStyle /* = compiled code */): kotlin.Unit { /* compiled code */ }

@androidx.compose.runtime.Composable @androidx.compose.runtime.ComposableContract public fun currentTextStyle(): androidx.compose.ui.text.TextStyle { /* compiled code */ }
2
Could be due to aar packaging stackoverflow.com/a/37609313/6335443?Jan Veselý

2 Answers

4
votes

According to Leland Richardson in this tweet: "This is a known issue with Android Studio Canary 13 where all jars from GMaven are not getting their sources attached properly. Not compose related, but since people using compose are forced to use AS Canary, it disproportionately affects compose. Folks are looking into it"

EDIT: after posting that, I downloaded AS Canary 11, opened the project, and went through the implementation code. Than i closed Canary 11 and opened Canary 13 and the issue is solved. But I noticed I can't invalidate caches/restart because the issue returns.

0
votes

Seems to be fixed in Canary 14.