2014-01-09 57 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> 

如果正常工作則包括有問題的動畫文件的文本。