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

Alphonse Yang
Alphonse Yang
7,830 Points

in the challenge, it shows there's a complier error, i think my code is right, but it just couldn't pass the check work

public static final String URL = "teamtreehouse.com"; I don't think there's wrong in my single line of code

2 Answers

Evelina Yankova
Evelina Yankova
5,869 Points

Hi, it looks fine. Where do you declare it? Is it after public class MainListActivity extends ListActivity {…

Alphonse Yang
Alphonse Yang
7,830 Points

it seems that the complier of the web is not in good condition, and i can pass the check now

Evelina Yankova
Evelina Yankova
5,869 Points

strange, can you send the complete source that you' re checking

Alphonse Yang
Alphonse Yang
7,830 Points

package com.example;

import android.os.Bundle; import android.view.View; import java.net.MalformedURLException; import android.util.Log;

public class MainListActivity extends ListActivity {

public static final String URL = "teamtreehouse.com";

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main_list);

    // Add Task 2 code here
}

}

here's the code, it couldn't pass in the afternoon, and showed there's an error: java 5 error while writing android.util.Log so i do think there would be a complier error but it passed the check just now,

Mark Josephsen
Mark Josephsen
8,803 Points

Your code is just fine, but you need to declare this inside the MainListActivity or else you'll get a compile error.