Android的工作室:摇篮生成错误,无法定位SDK和编译服务器 [英] Android Studio: Gradle Build error, can't locate SDK and compile-server

查看:204
本文介绍了Android的工作室:摇篮生成错误,无法定位SDK和编译服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Andr​​oid Studio的新用户,我有严重的问题,试图导入的Andr​​oid Studio项目到Android Studio的其他计算机上。一般情况下,我的摇篮并不想建项目,它是由与路径问题引起的。

I am new user of Android Studio and I have serious problem with trying to import Android Studio project to Android Studio on other PC. In general, my Gradle doesn't want to build the project and it is caused by problem with path.

错误日志:

Failed to import Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'E:\Projects\MenuMenu\EventGame\build.gradle' line: 1
A problem occurred evaluating project ':EventGame'.
A problem occurred evaluating project ':EventGame'.
The SDK directory 'E:\Program Files (x86)\Android\android-studio\bin' does not exist

我的Andr​​oid工作室SDK是在目录:

My Android-Studio SDK is in directory:

E:\Program Files (x86)\Android\android-studio\sdk

我从,你可以改变路径local.properties文件SDK类似问题的各个岗位找到。目前矿看起来像:

I found from various posts with similar problems that you can change path to sdk in local.properties file. Mine looks currently like that:

sdk.dir=

所以它是空的,但还是默认的路径是某种设置为E:\\程序文件(x86)\\的Andr​​oid \\ android的工作室\\ BIN,我不知道如何去改变它。如果我尝试添加到sdk.dir真实路径误差是相同的,但在错误的道路看起来像。

So it's empty, but still default path is SOMEHOW set to "E:\Program Files (x86)\Android\android-studio\bin" and I have no idea how to change it. If i try to add to sdk.dir real path the error is the same but the path in error looks like that.

The SDK directory 'E:\Program Files (x86)\Android\android-studio\bin"E:\Program Files (x86)\Android\android-studio\sdk"' does not exist

在的原因,我可以通过加入净人解决问题的发现:90%:sdk.dir = /应用/ Android的Studio.app/sdk

In 90% of causes I could find via the net people were solving the problem by adding: sdk.dir=/Applications/Android Studio.app/sdk

但随后的目录设置为E:\\ Program Files文件(x86)的\\ Android的\\ Android的工作室\\ BIN \\应用程序\\ Android的Studio.app \\ SDK和类似的东西并不在我的电脑存在。

But then directory is set to E:\Program Files (x86)\Android\android-studio\bin\Applications\Android Studio.app\sdk and something like that doesn't exist in my PC.

你有任何想法如何解决这个问题。有什么办法改变这种默认路径?我也得到错误:

Do you have any idea how to solve this problem. Is there any way to change this default path? I also get error:

E:\Projects\MenuMenu\EventGame\build.gradle
Gradle: A problem occurred evaluating project ':EventGame'.
> The SDK directory 'E:\Program Files (x86)\Android\android-studio\system\compile-server' does  not exist.

这就是我的文件夹的样子:
https://www.dropbox.com/s/ikj63gmyfax8z4u/folders.png

推荐答案

好吧,一般问题由事实,该项目是从Mac上安装Android的工作室进口造成的。斜线均oposite方向,不知何故程序无法覆盖默认的方向,因为他无法理解的路径。

Okay in general problem was caused by the fact that the project was imported from Android-Studio installed on Mac. The slashes were in oposite direction, and somehow program couldn't override default direction because he couldn't understand the path.

这篇关于Android的工作室:摇篮生成错误,无法定位SDK和编译服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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