【发布时间】:2014-05-30 18:54:32
【问题描述】:
我正在尝试将 AppCompat 中的主题用作我的父级,但似乎我无法包含资源。 例如:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomActionBarTheme"
parent="@style/Theme.AppCompat.Light.DarkActionBar">
</style>
</resources>
给我一个错误:
错误:任务“:processDebugResources”执行失败。 com.android.ide.common.internal.LoggedErrorException:无法运行命令: G:\Android\android-studio\sdk\build-tools\19.0.3\aapt.exe 包 -f --no-crunch -I G:\Android\android-studio\sdk\platforms\android-19\android. jar -ME:\Studio\Git\face_rec_android\build\manifests\debug\AndroidManifest.xml -SE:\Studio\Git\face_rec_android\build\res\all\debug -A E:\Studio\Git\face_rec_android\build\assets \debug -m -J E:\Studio\Git\face_rec_android\build\source\r\debug -F E:\Studio\Git\face_rec_android\build\libs\face_rec_android-debug.ap_ --debug-mode --custom-package in.amolgupta.helpingfaceless 错误代码: 1 输出: E:\Studio\myapp\build\res\all\debug\values\values.xml:127:错误:检索项目的父项时出错:找不到与给定名称匹配的资源 '@style/Theme.AppCompat.Light.DarkActionBar '。
我尝试过包含显然没有资源但主要使用build.gradle 之类的 jar 文件
dependencies {
compile 'com.android.support:appcompat-v7:19.1.+'
}
我有什么办法可以做到这一点?
由于那里没有 build.gradle 文件,因此无法从额外模块导入。
【问题讨论】:
-
@Amiya 谢谢,但我已经在做“使用 Gradle”的回答了。
标签: android android-studio android-support-library