Android Gradle 导出失败 [英] Android Gradle export failed

查看:28
本文介绍了Android Gradle 导出失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将 Eclipse 项目迁移到 Android Studio 时遇到问题.我按照此页面上的说明进行操作 http://developer.android.com/sdk/installing/迁移.html

当我在命令行输入 gradle 时,我收到此错误:

  • 哪里:设置文件 'C:\Users\Joshua\Development\workspace\settings.gradle' 行:1

  • 出了什么问题:评估设置工作区"时出现问题.

    <块引用>

    必须指定路径!

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

构建失败

总时间:1.1 秒

你认为它想要什么路径?它想要它在哪里?

解决方案

所以在我的情况下,我有一个多项目环境,我必须做的就是从 settings.gradle 文件中删除绝对路径在根目录(包含所有项目的目录)中,然后在 build.gradle 中,我必须删除编译语句的绝对目录,并确保我使用了 :{project_name} 而不是 ../{poject_name}

我意识到我的情况有点不同,但是如果您下载 gradle 并使用 --debug 开关,您应该能够找到哪些文件有问题,而且很可能是路径问题.

I am having trouble migrating my eclipse project to Android Studio. I followed the instcutions on this page http://developer.android.com/sdk/installing/migrate.html

When I type gradle at the command line I get this error:

  • Where: Settings file 'C:\Users\Joshua\Development\workspace\settings.gradle' line: 1

  • What went wrong: A problem occurred evaluating settings 'workspace'.

    A path must be 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.1 secs

What path do you think it wants? And where does it want it?

解决方案

So in my case I had a multi-project environment, what I had to do to get it working was to remove the absolute paths from the settings.gradle file in the root directory (dir containing all of the projects) and then in the build.gradle i had to remove the absolute directories for the compile statments and make sure that i used :{project_name} instead of ../{poject_name}

I realise that my situation was a bit different but if you download gradle and use the --debug switch you should be able to find which files have the problems and it's most likely a path problem.

这篇关于Android Gradle 导出失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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