Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Saurabh Bachawe
Saurabh Bachawe
469 Points

Inside the onCreate() method, log the message "Activity created!" using the Log debug

Please explain me both the parameters.

Please include a link to the challenge, so we can see what you need to do. You can do that very easily by just clicking the Get Help button as Treehouse then includes the link automatically. If you scroll down in a video you will see it in the lower right. For challenges it's in the upper right.

1 Answer

If you need more detail Ben goes through carefully in the video just before the challenge.

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_treehouse);
    Log.d(TAG, "Activity created!");
  }

As you can see here, the d() method has two parameters, TAG and "Activity created!".

You were asked to make "TreehouseActivity" the first parameter. But rather than using the String itself, the challenge asked you to use the TAG constant instead, as declared and initialized in this line:

public static final String TAG = "TreehouseActivity";