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

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

I just can't get my head around Android

I'm not giving up by any means but every time I go into Android Studio I'm faced with too many questions and not enough answers.

Common issues include

  • Rendering Problems in Android Preview - AS doesn't have the right classes for various devices previewed.
  • Emulator doesn't remove ActionBar despite selecting NoActionBar themes in styles.xml
  • Emulator loads too slowly or not at all. Happily, when it does get going and is left open it runs much faster
  • Unable to find resources when trying to select src for ImageViews
  • Problems finding the right parents to target the correct Theme. to select in styles.xml. Sometimes I find the versioned style folder but is vastly different to the standard one... that's if I find it at all.
  • Understanding how to place and layout Views and Components in Android preview.

But the biggest question on my mind is what API and version of Android SDK I should be targeting to follow the video. I'm sure that I've downloaded the wrong one to match the video, or rather the course uses a different API to what I am using and I'm struggling to keep up with the little differences.

Can I simply update my copy of AS and do my best to folow from there or is it absolutely necessary to follow along with the exact version for each course?

Thanks

Ben Deitch
Ben Deitch
Treehouse Teacher

Yep, feel free to update AS! Also, don't worry too much about API/SDK versions. Most of the time you'll be fine with the default, and if not we usually do a pretty good job of calling it out. As for the emulator/AS issues, hopefully updating will help with some of those, but there's been little bugs with Android preview for as long as I can remember (though it's a lot better than it used to be).

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Brilliant, thanks for your response Ben. :) I'll keep plugging away with Android for sure. I'm sure with practice and repetition things will start to make sense. It's good to know that rendering problems are a more common thing and not just something I have to put up with :D

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Ben,

So I think I may have gotten to the bottom of what was behind so many rendering problems in Android preview. The courses on Treehouses have been using App themes that use Relative Layout for XML files. But of course though I attempted to download the same version of Android used in the videos I don't think I followed it exactly right.

So when choosing layout files it looks like some of the themes followed the latest standard, "Coordinator layout" which might explain either the Rendering issues, missing classes etc and components not placing where I think they should go. If you're new, I can see how easy it can be to go down the wrong path without realising! :)