Android Studio 新建项目无法运行,抛出错误 [英] Android Studio new project can not run, throwing error

查看:44
本文介绍了Android Studio 新建项目无法运行,抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚才我已经安装并开始使用 Android Studio,并在配置了开始项目工作所需的一切后创建了新项目.在新创建的项目中,我没有更改任何内容,然后尝试运行该项目.但我猜它不起作用并且抛出了一些依赖错误.这是它

Just now I have installed and started working on Android Studio, and created new project after configuring everything I needed to start working on project. In newly created project, I have not changed anything and then tried to run the project. But it is not working and throwing some dependency error I guess. Here is it

Gradle: 
 FAILURE: Build failed with an exception.

  • 出了什么问题:发现任务':StudioTest2:packageDebug'的配置有问题.

    为属性dexFile"指定的文件C:\Users\StudioTest2\StudioTest2\build\libs\StudioTest2-debug.dex"不存在.

    File 'C:\Users\StudioTest2\StudioTest2\build\libs\StudioTest2-debug.dex' specified for property 'dexFile' does not exist.

  • 试试:使用 --stacktrace 选项运行以获取堆栈跟踪.使用 --info 或 --debug 选项运行以获得更多日志输出.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    无法使用 Gradle 分发版执行构建 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.

    Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.

    推荐答案

    我发现有帮助的一件事是在创建项目后导入项目,我遇到了同样的问题,但是一旦我导入项目(而不是仅仅打开它),它构建得很好.

    One thing I found that helped was to import the project after creating it, I was getting the same issue but once I imported the project (as opposed to just opening it), it built fine.

    这篇关于Android Studio 新建项目无法运行,抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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