[英]Cannot run any project in Android Studio 0.8.1
I cannot run any project. 我无法运行任何项目。 I created a default project with an acitivity and when i try to run it I get this error. 我创建了一个默认的项目,当我尝试运行它时,出现此错误。
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\androidstudio\sdk\build-tools\android-4.4W\dx.bat --dex --num-threads=4 --output C:\projects\app\build\intermediates\dex\debug C:\projects\app\build\intermediates\classes\debug C:\projects\app\build\intermediates\dependency-cache\debug
Error Code:
1
Output:
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
any dependency it tries to copy to dex/debug im guessing, but fails to do so. 它试图复制到dex / debug的任何依赖关系,但都没有这样做。 Any ideas? 有任何想法吗?
First of all, you should double check that the path C:\\androidstudio\\sdk\\build-tools\\android-4.4W\\dx.bat
does indeed exist. 首先,您应该仔细检查路径C:\\androidstudio\\sdk\\build-tools\\android-4.4W\\dx.bat
确实存在。 It could be that your SDK configuration is pointing at an invalid directory (though that's unlikely, given how far you're getting in the compilation/build process). 可能是您的SDK配置指向无效的目录(尽管考虑到您在编译/构建过程中所走的距离,这不太可能)。
After that, this looks very similar to a similar error on OSX , so you might try the proposed solution there, which is to run gradlew.bat --stop
using the Gradle wrapper script that should be in the root of your project and then try to compile again. 之后,这看起来与OSX上的类似错误非常相似,因此您可以在那里尝试建议的解决方案,即运行gradlew.bat --stop
使用应该位于项目根目录中的Gradle包装器脚本,然后尝试重新编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.