ActionBar problem

Hi all.
I'm learning Java for Android development using this book: http://www.apress.com/9781430266013
Though the book be recent, I get into some issue following it.
Now the problem is that building app Reminders something has changed and I'm not able to understand what exactly it be.
If I set the AppTheme to NoActionBar the app is rendered but  I don't have the app bar. If I set an app bar, whatever it be, I get rendering errors like this one:

The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  Exception Details java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.   at android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:34)   at android.support.design.widget.CoordinatorLayout.<init>(CoordinatorLayout.java:178)   at android.support.design.widget.CoordinatorLayout.<init>(CoordinatorLayout.java:172)   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)   at android.view.LayoutInflater.inflate(LayoutInflater.java:492)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard

I post here a screenshot of my SDK.
Android SDK
I don't post any other code because I'm not sure what you need to help me: please, feel free o ask me everything information you need.

Thank you all in advance
LVL 32
Marco GasiFreelancerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris Harte2015 Top Expert (Most Article Points)Commented:
From your error message
You need to use a Theme.AppCompat theme (or descendant)

In your IDE when editing your activity xml there is a drop down that allows you to pick a theme that has an AppCompat parent, eg Holo.

Your \res\values\styles.xml should look something like this (which is auto generated)
<resources>

	<!--
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
	-->
	<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
		<!--
            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.
		-->
	</style>

	<!-- Application theme. -->
	<style name="AppTheme" parent="AppBaseTheme">
		<!-- All customizations that are NOT specific to a particular API-level can go here. -->
	</style>

	
	
</resources>

Open in new window

Marco GasiFreelancerAuthor Commented:
I have this now and I don't understand because whatever I do it still holds AppTheme.NoActionBar...
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>
    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>

Open in new window

Chris Harte2015 Top Expert (Most Article Points)Commented:
Are you editing manually or using the graphical interface?
Because if you are doing it manually there are other files that need changing.
You should also have a \res\values-v11\styles.xml and a \res\values-v14\styles.xml which will be called depending on which API you are trying to run.

If you are using the IDE try manually removing the NoActionBar style from the \res\values\styles.xml.

I have to be honest, layout is the thing that gives me the most trouble in android. When all else fails, which it probably will, copy your source code and start again, this time picking the correct theme at creation time.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Marco GasiFreelancerAuthor Commented:
Thank you. Now I'm away but I'll check it later and I'll let you know.
Marco GasiFreelancerAuthor Commented:
Hi Chris. Okay: I've dropped the old project and started a new one using as minimum API level the 16.
Now it seems to work, but what's puzzling me is that in the Theme combobox I still have NoActionBar but if I run the program (without any code, just the skeleton automatically created) I get in my phone the action bar with the app name and the three dots which show Settings menu item... Isn't this an action bar?

I want to ask another question, please: I started to use Android Studio because I read that ADT for Eclipse is no more supported (they promote the migrating to Android Studio) and the Netbeans support for Android apps still lacks of a good GUI designer. Have you some suggestion about this? Thank you
Chris Harte2015 Top Expert (Most Article Points)Commented:
Yes that is the action bar and this is one of the reasons I have such problems with layout.

Right now the updates for ADT for Eclipse are still supported. There is rumour that this is coming to an end. I will use Eclipse as long as possible because I also use it for php. I do not like the look and feel of Android studio so will only use it when I have to (I have never been a fan of netbeans).

There is a new project at Eclipse called Andmore which is due to replace the android ADT.
https://projects.eclipse.org/projects/tools.andmore

Google own android, but it is written in Java. Oracle own Java. This means Google may not be in a position to write off eclipse. I am going to stick with Eclipse and see what pans out. Eclipse will never be as 'official' as Studio but I think it will be still around for a while yet.
Marco GasiFreelancerAuthor Commented:
Ok, thank you for your suggestion. I heard many devs who prefer Eclipse over Netbeans but when I tried to migrate I found too hard to give up to remote projects management:-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Android

From novice to tech pro — start learning today.