Thursday, February 3, 2011

Tip: New Layout Editor Exceptions

Does your Android Eclipse layout editor look like Figure 1? Does it show "Missing theme." or perhaps an error in the logs (perhaps something to do with "")? These are frequent occurrences on the very latest Android SDK Tools.
Figure 1
Layout Editor errors
 (Click for large view)
If you're having these types of issues, the solution may be simple. See that empty dropdown on the far right? Perhaps it's not empty, but shows the Android version? Yeah, the one highlighted in Figure 2 shown below... Click on this dropdown and pick one of the options.
Figure 2
Layout Editor Drop Down
(Click for large view)
Does your layout editor now look like Figure 3? If so, you're all set. If not, you'll need more than just this tip.
Figure 3
Layout Editor, no errors
(Click for large view)
Why the new dropdown? We believe that it will show what a layout should look like on various versions of Android platform. So, presumably, you'll want to pick your Target SDK most of the time and if, during testing, you find a problem outside the target SDK, this drop down may help speed up layout debugging.

Happy Android Coding!


Mike Bosch said...

Thanks for sharing.

maneesh said...

Thanks for a good post on android application development. Do you a newsletter I can subscribe to?

john said...

I've just ordered your AMAD book. Can you suggest a good basic Eclipse book? Most of the Eclipse books that I have found online are years old.

Shane Conder said...

Hi John,

That's a very good question. We have some tips in our book in an appendix, but we don't have any detailed tutorials on Eclipse. We, also, have found that there are a lack of any print books on the most recent versions of Eclipse.

Eclipse hosts documentation and guides. For instance, the Java Development User Guide might be useful to you. It's near the top of the list at the Eclipse documentation site. It includes some getting started material, including a basic tutorial. The Workbench User Guide is a bit higher level and talks about some of the Eclipse terminology and and general UI usage.

I hope one of these resources will help.

Shane Conder said...

Hi Maneesh,

We don't have an explicit newsletter. The posts on this blog are available as an email, but that's about the extent of it.