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 Adapting Data for Display in a List Cleaning Up Our Presentation

Felix lim
Felix lim
6,049 Points

Java.lang.NegativeArraySizeException-1

When i change the blog url to my own blog URL, it gave me error below when i run the emulator.

My blog URL is : http://www.wetravelduck.com/api/get_recent_posts/

06-20 11:21:04.490: E/MainListActivity(2013): Exception caught: 
06-20 11:21:04.490: E/MainListActivity(2013): java.lang.NegativeArraySizeException: -1
06-20 11:21:04.490: E/MainListActivity(2013):   at com.wetravel.blogreader.MainListActivity$GetBlogPostsTask.doInBackground(MainListActivity.java:136)
06-20 11:21:04.490: E/MainListActivity(2013):   at com.wetravel.blogreader.MainListActivity$GetBlogPostsTask.doInBackground(MainListActivity.java:1)
06-20 11:21:04.490: E/MainListActivity(2013):   at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-20 11:21:04.490: E/MainListActivity(2013):   at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-20 11:21:04.490: E/MainListActivity(2013):   at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-20 11:21:04.490: E/MainListActivity(2013):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-20 11:21:04.490: E/MainListActivity(2013):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-20 11:21:04.490: E/MainListActivity(2013):   at java.lang.Thread.run(Thread.java:841)
06-20 11:21:04.760: W/EGL_emulation(2013): eglSurfaceAttrib not implemented

1 Answer

Felix lim
Felix lim
6,049 Points

I figured out the answer from Ben

https://teamtreehouse.com/forum/trying-to-retrieve-data-from-my-own-blog-help

the special unicode char could break the code.