Theme.AppCompat.Light.DarkActionBar - 无资源发现 [英] Theme.AppCompat.Light.DarkActionBar - No resource found
本文介绍了Theme.AppCompat.Light.DarkActionBar - 无资源发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何正确使用Android的支持库,因为我有这个错误在我的清单文件:
安卓主题=@风格/ Theme.AppCompat.Light.DarkActionBar
错误:错误:没有资源的发现,匹配给定的名字
(在主题,值为@风格/ Theme.AppCompat.Light.DarkActionBar)。
AndroidManifest.xml中/ TTAB线39的Android AAPT问题
我的朋友做pviously这个实施对我来说$ P $上的其他电脑,现在我不得不独自做到这一点。请帮我:)
我使用ADT
我的styles.xml:
<资源>
<! -
基本应用的主题,依赖于API级别。这个主题被替换
通过AppBaseTheme从RES /值-VXX /上较新的设备styles.xml。
- >
<样式名称=AppBaseTheme父=机器人:Theme.Light>
<! -
在新的API级别可以在可用主题自定义
RES /值-VXX / styles.xml,而自定义相关
向后兼容性可以去这里。
- >
< /风格>
<! - 应用主题。 - >
<样式名称=AppTheme父=AppBaseTheme>
<! - 所有的定制,这不是针对特定的API级别的可以去这里。 - >
< /风格>
<样式名称=Theme.AppCompat.Light>
&所述;! - 主题定制这里。 - >
< /风格>
<样式名称=Theme.AppCompat.Light.DarkActionBar父=Theme.AppCompat.Light>
&所述;! - 主题定制这里。 - >
< /风格>
< /资源>
解决方案
在Android的支持-V7-appcompat项目:
- 从Package Explorer中删除Android的支持-V7-appcompat。
- 重新导入并勾选复制到工作区
- 在属性 - > Android的 - >在项目建设目标,取消了Android 2.2和Android的检查4.1.2
- 在Java构建路径,取消,如果您有任何的.jar库,并取消选中的依赖性
在另一方面,使用项目Android的支持-V7-appcompat:
- 在属性 - > Android的添加库,但取消IsLibrary 。
- 在Android的 - >项目构建tarjet检查的Android 4.0 。
- 在Java构建路径 - >订单和出口 - >未选中该.jar库
- 最后做了项目 - >清除这两个项目
How to use properly Android Support Library because i have this error in my manifest file:
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
error: Error: No resource found that matches the given name
(at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar').
AndroidManifest.xml /ttab line 39 Android AAPT Problem
My friend did this implementing for me previously on other computer, now i have to do this alone. Please help me:)
I am using ADT
My styles.xml:
<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="android:Theme.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>
<style name="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
<style name="Theme.AppCompat.Light.DarkActionBar" parent="Theme.AppCompat.Light">
<!-- theme customizations here. -->
</style>
</resources>
解决方案
In "android-support-v7-appcompat" project:
- Delete "android-support-v7-appcompat" from Package explorer.
- Import again and check "Copy into workspace"
- In Properties -> Android -> in Project build target, uncheck Android 2.2 and check Android 4.1.2
- In Java build path, uncheck if you have any .jar library, and uncheck the Dependences
In other hand, the project that uses "android-support-v7-appcompat":
- In Properties -> Android add the library, but uncheck "IsLibrary".
- In Android -> Project build tarjet check Android 4.0.
- In "Java Build Path" -> Order and Export -> Unchecked the .jar library
- Finally do a "Project -> Clean" both projects
这篇关于Theme.AppCompat.Light.DarkActionBar - 无资源发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文