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 Build a Blog Reader Android App Getting Data from the Web Trying Code and Catching Exceptions

getting error .......!!

try { URL blogFeedUrl = new URL (http://blog.teamtreehouse.com/api/get_recent_summary/?count=20); } catch (MalformedURLException e ){

Syntax error on token(s), misplaced construct(s) getting error till URL blogFeedUrl = new URL

and the second error Syntax error on token ":", EmptyStatement expected after this token on (http:

please answer and help

1 Answer

Ethan Lowry
PLUS
Ethan Lowry
Courses Plus Student 7,323 Points

In the code you posted there are no quotation marks around the string you are passing in to new URL - is this the case in your actual code as well?

got it Thanxxxxxxxxx

Ethan Lowry
Ethan Lowry
Courses Plus Student 7,323 Points

You're welcome - in future try and always check carefully through your code for basic errors like this before asking online :)

OK ..........and thanx again