Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Blog Reader Android App Exploring the Master-Detail Template Blog Reader Project Overview

Rodrigo Rocha
Rodrigo Rocha
4,042 Points

Blog Reader Project Overview

What is wrong with this code. The exercise workspace don't like me?

This is a Challenge

Finally, write the 'message' variable to the log using the Log.d() method. For the first parameter of Log.d() (the tag), use “CodeChallenge”, and use the 'message' variable as the second parameter.

And this is my code:

String title1 = "Android is awesome"; String title2 = "Mike is cool"; String title3 = "Treehouse loves me"; String[] titles = { title1, title2, title3 }; String message = titles[1];

Log.d(“CodeChallenge”, message);

I tried with other codes too:


String title1 = "Android is awesome"; String title2 = "Mike is cool"; String title3 = "Treehouse loves me"; String[] titles = { title1, title2, title3 }; String message = titles[1]; public static final String TAG = “CodeChallenge”;

Log.d(TAG, message);

And I tried with others code too but nothing works in this challenge.

2 Answers

I did the same and it worked for me

Imgur

If it still doesn't work then you need to address this to a Treehouse teacher