Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Android app: Android Basics with Compose First Android app: Android Basics with Compose #1023

Open
Sturobbie opened this issue Jan 25, 2025 · 0 comments

Comments

@Sturobbie
Copy link

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-first-app?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-2%3F_gl%3D1*typrzn*_up*MQ..%26gclid%3DCjwKCAiAtNK8BhBBEiwA8wVt9xHCDYpsK1nCszntsCk5NXxsxWoDRGkSZWsBF-AdX8bSginNaJzAvRoCwDgQAvD_BwE%26gclsrc%3Daw.ds%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-first-app&_gl=1*typrzn*_up*MQ..&gclid=CjwKCAiAtNK8BhBBEiwA8wVt9xHCDYpsK1nCszntsCk5NXxsxWoDRGkSZWsBF-AdX8bSginNaJzAvRoCwDgQAvD_BwE&gclsrc=aw.ds#0

In which task and step of the codelab can this issue be found?
Step 4
Step 5, substep 1

Describe the problem

Step 4, the default code shown on the codelab page does not match what I'm presented with in Android Studio - see screenshot Differences.png for info. There seems to be additional code in Android studio.

Step 5, substep 1 - the "surround" option is greyed out and not available - see screenshot MissingOption.png - could this be because of the additional code that Android studio has added above?

Steps to reproduce?

  1. Work through the codelab above

  2. Compare the contents of class MainActivity : ComponentActivity() in MainActivity.kxt in Android Studio against that of the screenshot in Step 4 of the codelab

  3. Try following step 5 of the codelab.

  4. Highlight the "text = "Hi, my name is $name!"," line in the composable Greeting function, then right click and try to click on the surround option, its not available. which makes the remaining steps of the guide unfollowable.

Image
Image

Versions
_Android Studio version: see attached screenshot, Version.png
API version of the emulator:

Image

Additional information
Screenshots attached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant