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

"Unfortunately, Blog Reader has stopped." What's going on here?

I am to the stage in the Blog Reader project where I am asking for permission to access the internet, as well as asking to view whether or not there is a connection to a server. I thought that I had everything implemented correctly, but when I try to run the app, I get a message immediately saying that the app has stopped. I can post any code that anyone thinks may be helpful in solving this problem. Thanks in advance!

Hi Dylan

Can you please post your logcat error messages and the class containing the code where you think the error is occurring, if your unsure which code is causing the problem just paste logcat and we can go from there

Thanks Daniel

1 Answer

Hi Dylan

After looking at your Logcat it appears you may be missing some of the permissions required in your android manifest xml file in order to run.

You will need to add the following 2 lines of code into your android manifest xml file, you can paste them in directly above the first application tag.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Hopefully this will resolve the issue however let me know if this doesn't work or you get any further problems

Thanks Daniel

Thanks man, I had those lines in there but after reading your comment I double checked them and it turns out I had some words in caps when they shouldn't have been. That got it working.