我正在从eclipse-ADT迁移到Android演播室,并在构建时获得此错误:-
AGPBI: {"kind":"ERROR","text":"Attribute \"track\" has already been defined","sourcePath":"C:\\densie\\project\\src\\main\\res\\values\\colors.xml","position":{"startLine":1},"original":""}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':keyOff:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\180336\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.782 secscolors.xml就像:-
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="clicked">#7700ccff</color>
<color name="red">#ffff0000</color>
<color name="dark">#ff303030</color>
<color name="white">#ffffffff</color>
<color name="color_cyan_0">#ff86B6aD</color>
<color name="black">#ff000000</color>
<color name="grey">#ff808080</color>
<color name="menu_grey">#ff888888</color>
<color name="light_grey">#ffcccccc</color>
<color name="dark_white">#ffdddddd</color>
<color name="active_guest">#7777ff</color>
<color name="light_green">#33aa99</color>
<color name="ttms_green">#00fcfc</color>其中没有“跟踪”属性。
帮帮忙吧。我已经花了很多时间搜索它或查看论坛,这真的令人沮丧。
发布于 2015-06-29 18:51:22
请将compile 'com.android.support:appcompat-v7:22.2.0' (可能您的版本不同)从app/build.gradle file.Then *Tools>Android>Sync with Gradle files*中的依赖项中删除。和*Build>Clean Project & Rebuild*。
更多:
https://stackoverflow.com/questions/30812543
复制相似问题