简体   繁体   English

在AndroidStudio中导入gradle项目失败

[英]Importing gradle project in AndroidStudio fails

I've got a win8 64bit computer. 我有一台win8 64位电脑。 I downloaded android studio, exported from eclipse my project as gradle build. 我下载了android studio,从eclipse我的项目导出为gradle build。 Then I wanted to import in AndroidStudio, but it always fails with the following message: 然后我想在AndroidStudio中导入,但总是失败并显示以下消息:

Could not fetch model of type 'IdeaProject' using Gradle installation 'C:\\Develop\\gradle'. 无法使用Gradle安装'C:\\ Develop \\ gradle'获取'IdeaProject'类型的模型。

Build file 'D:\\www\\DiLocSyncMobile\\native\\android-debug\\build.gralde' line: 9 构建文件'D:\\ www \\ DiLocSyncMobile \\ native \\ android-debug \\ build.gralde'行:9

A problem occurred evaluating root proect 'android-debug'. 评估root proect'android-debug'时出现问题。

A problem occurred evaluating root project 'android-debug'. 评估根项目'android-debug'时出现问题。

The SDK directory 'C:\\Applications\\adt-bundle-mac\\sdk' does not exist. SDK目录“C:\\ Applications \\ adt-bundle-mac \\ sdk”不存在。

Consult IDE log for more details (Help | Show Log) 有关更多详细信息,请参阅IDE日志(帮助|显示日志)

I tried nearly everything (downloaded gradle, added it to the path, delete .gradle folder in user directory, etc. 我几乎尝试了所有东西(下载gradle,将其添加到路径,删除用户目录中的.gradle文件夹等。

But nothing helped.. Some ideas? 但没什么帮助..一些想法?

It looks like your SDK directory is not set correctly. 看起来您的SDK目录未正确设置。 In fact, it seems as though it is set to the mac android developer tools. 事实上,似乎它设置为mac android开发人员工具。

I would suggest lookings at your local.properties file (or creating one if it is not already in the root of your project) and making sure that it has the following line: 我建议您查看local.properties文件(如果它不在项目的根目录中,则创建一个)并确保它具有以下行:

sdk.dir=<path to your android sdk>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM