Android 2.0 : Support Actionbar library (appcompat v7 support library without resources):No resource found @style/Theme.AppCompat.Light.DarkActionBar

actionbarsherlockandroidandroid-support-library

I followed the http://developer.android.com/guide/topics/ui/actionbar.html link for implementing ActionBar in Android 2.0

I have followed the following procedures.

i) Create a new Project

ii) Create a libs folder in my project

iii)include android-support-v13.jar & android-support-v7-appcompat.jar files and add them in build path

My Manifiest xml file is

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tgactionbar"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

    <application

        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        >
        <activity
            android:name="com.example.tgactionbar.MainActivity"
            android:label="@string/app_name" 
            android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

i got this error

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

Best Answer

If you are using eclipse, adding the compatible library it's pretty easy: enter image description here

I hope this resolve your problem. Do a new project from scratch and try this, if doesn't work i will try other things.

Related Topic