失败:建立失败,一个异常
FAILURE: Build failed with an exception.
出了什么问题:执行失败的任务:应用程序:preDexDebug'。
What went wrong: Execution failed for task ':app:preDexDebug'.
java.io.IOException: Cannot run program "C:\Users\SETIAWAN\AppData\Local\Android\sdk\build-tools\21.1.2\dx.bat":
CreateProcess error=2, The system cannot find the file specified
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: 1 mins 12.109 secs
任何人都可以提供帮助。当我尝试运行dx.bat。错误Windows无法找到这个文件(dx.bat)
Anyone can help. When I try to run dx.bat. Error Windows can't find this file(dx.bat)
您可以将Android系统的支持,v4.jar多次。从项目的 build.gradle
删除Android的支持 - v4.jar的依赖关系,只是有一个单一的依赖关系,使得:
You may adding android-support-v4.jar for multiple times. Remove the dependencies of android-support-v4.jar from project's build.gradle
and just have a single dependencies, such that:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
}