2016-03-15 48 views
1

最近我遷移Eclipse項目到Android Studio和建設項目失敗緊縮一些文件的Android工作室

AAPT err(Facade for 170558904): libpng error: Not a PNG file
Error:Execution failed for task ':app:mergeDebugResources'.
Some file crunching failed, see logs for details

時遵循與此相關的各種問題,我現在得到下面的錯誤,我改名爲所有0.9。 png到.png。它甚至沒有顯示出現錯誤的文件名。我怎樣才能找出哪些文件具有問題

+0

http://stackoverflow.com/questions/30764604/execution-failed-for-task-appmergedebugresources-crunching-cruncher-png-fa and http://stackoverflow.com/questions/29026024/errorexecution-failed-for -task-projectnamemergedebugresources -kunching –

+1

他們早些時候是.9.png,但我讀到,使他們.png可以工作 –

+1

@IntelliJAmiya我已經閱讀你的答案和其他相關帖子,並嘗試了一切,但它不工作。此前它顯示以下文件有一些問題,但現在它甚至不顯示哪個文件有錯誤 –

回答

0

最好的解決辦法是changue LA buildDir中的build.gradle:

爲我工作。

例如:

allprojects { 
    buildDir = "C:/tmp/${rootProject.name}/${project.name}" 
    repositories { 
     jcenter() 
    } 
} 

重建和快樂編碼。

+0

我的問題不是由於項目路徑。這是由於壞的PNG文件。 –

相關問題