Android 2.0 : Support Actionbar library (appcompat v7 support library without resources):No resource found @style/Theme.AppCompat.Light.DarkActionBar
Solution 1
If you are using eclipse, adding the compatible library it's pretty easy:
I hope this resolve your problem. Do a new project from scratch and try this, if doesn't work i will try other things.
Solution 2
To add v7 appcompat library for action bar, then you need to add the library with resources: http://developer.android.com/tools/support-library/setup.html#download
Once you have included the android-support-v7-appcompat.jar and android-support-v4.jar files in the project build path, then you have to also add the Support Library Project. It can be found at
<sdk>/extras/android/support/v7/appcompat/.
To add the library project:
- In the Project Explorer, right-click your project and select Properties.
- In the Library pane, click Add.
- Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
- In the properties window, click OK.
![Sridhar](https://i.stack.imgur.com/rvzhk.jpg?s=256&g=1)
Sridhar
PHP developer, Android Developer, iOS Developer profile for Sridhar at Stack Overflow, Q&A for professional and enthusiast programmers http://stackoverflow.com/users/flair/1085737.png?theme=dark
Updated on June 07, 2022Comments
-
Sridhar about 2 years
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').
-
Sridhar almost 11 yearsThanks,but I got this exception java.lang.ExceptionInInitializerError at android.support.v7.app.ActionBarActivityDelegate.createDelegate(ActionBarActivityDelegate.java:51)
-
Sulfkain over 9 years@Sridhar this kind of error are throw when some problem on the initializerm, don't seems to be related with Support Library, please, check all parameters are correct. If not, open other thread