Question

I'm trying to build an app with an ActionBar (with "up" buttons), but am utterly failing to properly include the appcompat-v7 library.

I'm using Eclipse. I don't want to use Android Studio simply because I've tried to switch to Idea several times and have never been as comfortable as in Eclipse.

I have followed the official instructions at d.android.com, but am not getting it to work. I have also googled extensively and followed the advice found there - including several threads on here.

The result I'm getting is that the classes (Fragment, ActionBarActivity etc.) are found by Eclipse, but things like themes are not. I can't properly deploy my app without using an Theme.Appcompat.* theme. The error I get when trying to set android:theme="@android:style/Theme.AppCompat.Light.DarkActionBar" is error:

Error: No resource found that matches the given name (at 'theme' with value '@android:style/
 Theme.AppCompat.Light.DarkActionBar').

It occurs to me as I write this that perhaps my problem is more with how I'm trying to set the theme than the appcompat libraries - but I won't assume and hopefully someone can help me figure out where I'm going wrong.

Interestingly, whenever I attempt to deploy my app, the following error appears in the eclipse console:

[2013-08-28 15:20:07 - android-support-v7-appcompat] Could not find android-support-v7-appcompat.apk!

Here are a couple of screenshots showing the properties of my app and how I've tried to include the appcompat library, which has been imported into my Workspace and has been set to be an Android library.

Android settings

Build path settings

Was it helpful?

Solution

You theme should be android:theme="@style/Theme.AppCompat.Light.DarkActionBar" remove android:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top