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 Weather App (2015) Working with JSON Setting CurrentWeather from JSON

how to activate a thread ?

hi again,

i'm trying to run the debugger in my weather app but when the debug process is running i got an "x" inside the red circle which indicates the breakpoint and when positioning on i read the following message:

Line 94 in MainActivity.getCurrentDetails() (com.example.mario.stormy) No executable code found at line 94 in class com.example.mario.stormy.MainActivity Suspend: thread

I assume if i got this thread active the debugger will show me the result i need as ben did in the video.

Awaiting your remarks.

Thanks in advance,

2 Answers

Seth Kroger
Seth Kroger
56,403 Points

As I mentioned before in a previous question you asked, a breakpoint needs to be on a line of actual code, not a comment or blank line (this includes purely structural lines like curly-braces).

thank you for answering Seth.

It make it sense to me what you tell me, however the breakpoint at line 94 is where is the JSONObject currently and ben did the same but in the video the breakpoint is set up at line 86 (min. 02:38 Setting CurrentWeather from JSON) and if it ran successfully for ben honestly i don't know where the error is in my case. All i'm trying to get as a result of this, it's to visualize all key/pairs and values gotten from the web with their corresponding variables onto the JSONObject currently.

Sorry i asked too much but in my experience i always fix a problem so i don't find it in my way over in the future again.

Warmest Regards,