机器人工作室着构建 [英] android studio cant build

查看:188
本文介绍了机器人工作室着构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

失败:建立失败,一个异常

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'
}

这篇关于机器人工作室着构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆