Android Build a Simple Android App Basic Android Programming Accessing Views in Code: Declaring Variables

essam rashad
essam rashad
245 Points

Text in red, alt-enter doesn't work on new Android Studio, what should I do instead?

Hey,

Up till now everything has been very clear but this video used a lot of new jargon which made it very difficult to understand. For example, methods was not explained, among others. As a result Im just copying what Ben does on screen, but using the new Studio, some things are different. What is the idea behind importing, what is a private, and how do you suggest I import the thing (as alt-enter just brings up another window, unlike in the video)

Thanks a lot, E

2 Answers

Seth Kroger
MOD
Seth Kroger
Treehouse Moderator 56,267 Points

If it gives you a menu with the top option of "Import class" use that. The blinking cursor needs to be directly on the red text, not just on the same line or elsewhere, when you type Alt+Enter.

The course does assume you know some Java already or you've taken the courses in the Java Track as a prerequisite to introduce you to the language first. If you're unfamiliar with the language I recommend taking those courses first.

essam rashad
essam rashad
245 Points

Thanks! I think I'll go back have have a look at the Java course first before continuing!

With the latest Studio, hover over the red text and left click to underline then, alt + enter.