assets中放入中文文件名导致Android Studio编译错误

一个android项目突然出现编译错误,如下:
:app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'K:\Android\android-sdk\build-tools\23.0.2\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
网上查询n久,都是说使用mimap图标替换drawable,可是项目中,根本没有此问题。看来引起错误的原因有多种可能。 终于使用如下命令,在dos窗口中查看到错误原因:
gradlew assembleDebug --info --stacktrace --debug

就是assets中有带中文的文件名!faint!

改为英文名字,解决。

posted @ 2016-08-05 14:07  柒零壹  阅读(1077)  评论(0编辑  收藏  举报