2014-01-29 6 views
1

이전 버전에 대한 참조가 있지만 최신이 아닙니다. Android Studio를 0.4.3으로 업데이트하고 새 프로젝트를 만들었습니다. 빌드는 아래 즉시 실패Android Studio의 Gradle 오류 0.4.3

Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'. 
com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'. 
    at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:185) 

내가 JDK 1.7를 설치하고 그 내 자바 홈을 (이전 1.6) 설정하지만 같은 오류가 발생 노력했다. 내 GradleWrapper.properties는 다음과 같습니다.

#Wed Apr 10 15:27:10 PDT 2013 
distributionBase=GRADLE_USER_HOME 
distributionPath=wrapper/dists 
zipStoreBase=GRADLE_USER_HOME 
zipStorePath=wrapper/dists 
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip 

아이디어가 있으십니까?

+1

build.gradle에서 v0.8 플러그인을 지정하고 있습니까? –

+0

아마도 @stackoverflow.com/questions/21330021/gradle-error-when-pressing-run-app-android-studio/21330597#21330597 – pyus13

+0

@ScottBarta 덕분에 중복되었습니다 .- 어떻게 든 0.10으로 변경되었습니다 (아마도) - 0.8로 다시 변경했습니다. 이제 gradlew를 실행하는 명령 줄에서 빌드 할 수 있지만 Android Studio에서 프로젝트를 만드는 것은 여전히 ​​실패합니다 ... 진행! – James

답변

2

정확한 버전의 Android Gradle 플러그인을 사용하고 있는지 확인해야합니다. Android Studio 0.4.3의 경우 0.8.X 시리즈입니다. 같은 build.gradle 에 지정 :

dependencies { 
    classpath 'com.android.tools.build:gradle:0.8.+' 
} 

이 최상위에있을 수 build.gradle 또는 모듈의 하나; Android Studio의 이후 버전에서 새로 생성 된 프로젝트에서 우리가 배치 한 위치가 변경되었습니다.

+0

이제 명령 프롬프트에서 빌드 할 수 있지만 안드로이드 스튜디오에서는 빌드하지 않습니다. 손짓을 계속하지만 그것은 확실히 도움이 조금! 이것은 최상위 레벨 build.gradle에 있으며, 프로젝트의 해당 줄은 없습니다. – James

+0

@ 스콧 이러한 그라데이션 버전은 혼란과 빌드 오류의 큰 포인트입니다. 왜 잘못 되었는 지 안다면 캔트 AS가이 모든 것을 자체적으로 처리합니다. – pyus13

+0

프로젝트로드 시간에 실제로 플러그인 및 Gradle 버전을 확인하고 버전이 잘못되었을 경우 수정합니다. 버전 체크를하기 위해 우리가 사용하는 Gradle 내부 API가 Gradle의 두 버전 (내 메모리가 제공되면 1.8과 1.9) 사이에서 바뀌었고 버전 확인을하기 전에 실패했습니다. 나는이 실패가 안드로이드 플러그인의 일부 버전에도 전파된다고 생각한다. 그리고 나는 그것이 현재 일어나고 있다고 생각한다. 저는 이것이 정말로 혼란스러운 문제라고 생각합니다. 그리고 우리는 그것을 올바르게 고치고 싶습니다. –

관련 문제