2014-01-09 84 views
1

在android studio中得到一个奇怪的gradle错误,这是我没有得到的,直到我在我的res目录中添加一个动画文件夹。在此文件夹我有奇怪的gradle错误 - Android工作室

标签和一个字母副标志设置一个动画文件。

Gradle: 
FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':FullerUV:compileDebug'. 
> Compilation failed; see the compiler error output for details. 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

任何想法?

+0

需要更多日志。资源文件格式错误时可能会发生该错误。 –

+0

你用--info或--debug运行过吗?这可以给你一个提示。 – Spindizzy

+0

这是我的下一个问题。我究竟该怎么做呢? –

回答

0

这是这样你的动画和文件里面的样子:

enter image description here

我想的名字是别人正确的你会被弄成错误这样

FAILURE: Build failed with an exception. 

    * What went wrong: 
    Execution failed for task ':YourPocket:mergeDebugResources'. 
    > PROJECT_DIR\src\main\res\anim\slide_in- right.xml: Error: Invalid file name: must contain only lowercase letters and digits ([a-z0-9_.]) 

    * Try: 
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. 

确保您编写正确的动画在anim dir中删除动画文件后尝试编译,或者使用下面给出的文本更改文件中的内容。保持anim目录。

<set xmlns:android="http://schemas.android.com/apk/res/android"> 
<translate android:fromXDelta="50%p" android:toXDelta="0" 
     android:duration="@android:integer/config_mediumAnimTime"/> 
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" 
     android:duration="@android:integer/config_mediumAnimTime" /> 
</set> 

如果正常工作则包括有问题的动画文件的文本。

相关问题