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 trialProsper moyo
1,876 Pointslog
Inside the onCreate() method (after the setContentView() call), log the message "Activity created!" using the Log debug method (remember it's just one letter). The 1st parameter should be "TreehouseActivity", but use the TAG variable instead of typing it out a second time. The 2nd parameter is the message.
am failing to see my errors on this challenge
package com.teamtreehouse;
public class TreehouseActivity extends Activity {
public static final String TAG = TreehouseActivity.class.getSimpleName();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_treehouse);
Log.d( TAG , msg:"Activity created()")
}
}
1 Answer
Jonathan Grieve
Treehouse Moderator 91,253 PointsIt looks like you just need to edit your string that you're passing into your tag. You're using parentheses as you would if you were calling a method!. :-)
Prosper moyo
1,876 PointsProsper moyo
1,876 Pointsthanks Jonathan for replying am still failing to pass after trying your solution cn you please show me what you are saying by correcting my code and sending me the corrected
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsYou need to remove the `
msg:
bit from your string. It looks like this is a code marker from Android Studio that's been copied into the code challenge. That just means it's expecting a message in a string as the parameter.So to pass you just need
Log.d( TAG, "Activity created!");