Android 2.0:支持Actionbar库(无资源的appcompat v7支持库):找不到资源@ style / Theme.AppCompat.Light.DarkActionBar [英] Android 2.0 : Support Actionbar library (appcompat v7 support library without resources):No resource found @style/Theme.AppCompat.Light.DarkActionBar

查看:111
本文介绍了Android 2.0:支持Actionbar库(无资源的appcompat v7支持库):找不到资源@ style / Theme.AppCompat.Light.DarkActionBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了 http://developer.android.com/guide/topics /ui/actionbar.html 链接,用于在Android 2.0中实现ActionBar

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)创建一个新项目

ii)在我的项目中创建一个libs文件夹

iii)包括android-support-v13.jar& android-support-v7-appcompat.jar文件并将其添加到构建路径中

我的Manifiedt xml文件为

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>

我遇到了这个错误

错误:错误:找不到与给定名称匹配的资源(在主题中,值为
'@ style / Theme.AppCompat.Light.DarkActionBar')。

推荐答案

如果您使用的是eclipse,则添加兼容库非常简单:

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.

这篇关于Android 2.0:支持Actionbar库(无资源的appcompat v7支持库):找不到资源@ style / Theme.AppCompat.Light.DarkActionBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆