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 Weather App (2015) Networking Making an HTTP GET Request with OkHttp

Brady Gordish
PLUS
Brady Gordish
Courses Plus Student 5,354 Points

Depreciated code?

While it doesn't seem to be effecting the build, I am getting a warning I haven't seen before on line 11 where we declare the MainActivity class. ActionBarActivity has a line through it and states that 'Android.support.v7.app.ActionBarActivity' is depreciated.

What does it mean if something in your code is depreciated, and what would be the best approach to fixing such a warning?

2 Answers

Brady,

I too am working on the Android Track and ran into the same issue. I didn't change mine throughout the whole session but did wonder about a solution. Here is what I found:

https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

The short version is that you should use AppCompatActivity instead. I'm going to try that today and I will let you know my results.

Ron