First Android app: Android Basics with Compose - missing import for Surface
Opened this issue · 0 comments
radbobdad commented
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-first-app#4
In which task and step of the codelab can this issue be found?
Step 3
Describe the problem
When changing the Container type from Box to Surface, Surface appears in red, because there is no import for the class.
Steps to reproduce?
1 Follow steps up to Step 3 (i.e. add a Widget/Container around "text" variable assignment, see it default to "Box")
2 Change "Box" to "Surface()"
Result: Surface is in red, because there is no import statement for the class.
Imports to not match those shown in step 5. In particular it is missing:
import androidx.compose.material3.Surface
Adding that line will resolve the problem.