2014-12-08 75 views
8

Tôi vừa tải xuống Android Studio 1.0RC4 và tôi không thể tạo bất kỳ dự án nào, ngay cả dự án mới được tạo.Android Studio 1.0RC4 Lỗi xây dựng Gradle

Các lỗi tôi nhận được là:

Error:Could not run build action using Gradle distribution ' https://services.gradle.org/distributions/gradle-2.2.1-all.zip '.

tôi đã có thể tải về zip từ trình duyệt nhưng nó không làm việc trên AS. Đây là tập tin build.gradle tôi:

// Top-level build file where you can add configuration options common to all sub-projects/modules. 


buildscript { 

    repositories { 
     jcenter() 
    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:1.0.0-rc1' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

Mô-đun build file:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 19 
    buildToolsVersion "19.1.0" 

    defaultConfig { 
     applicationId "simple.com.car10" 
     minSdkVersion 14 
     targetSdkVersion 19 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
} 

Graddle-wrapper.properties

distributionBase=GRADLE_USER_HOME 
distributionPath=wrapper/dists 
zipStoreBase=GRADLE_USER_HOME 
zipStorePath=wrapper/dists 
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 

Tôi cố gắng chạy graddle - xây dựng từ cmd, và tôi gặp lỗi này:

FAILURE: Build failed with an exception. 

* What went wrong: 
Build file 'C:\Users\Giovanni\uild' does not exist. 

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

BUILD FAILED 

Tổng t ime: 3,093 giây

JDK: 1.8.0_05

Khi tôi nhấn thử lại không có gì xảy ra, tôi đã cố gắng gỡ bỏ cài đặt tất cả mọi thứ và cài đặt lại nhưng nó đã không làm việc.

Bất kỳ ý tưởng nào? Cảm ơn.

+0

Đây là tệp Gradle chung. Đăng bài có tên mô-đun của bạn. – sandalone

+0

được chỉnh sửa với ứng dụng graddle – Moondustt

+0

bạn có thể hiển thị tệp gradle-wrapper.properties của mình không? – buxik

Trả lời

21

Cuối cùng tôi đã nhận nó chàng trai làm việc

Tôi phải xóa số .gradle thư mục trong 'C: \ Users \ Username \' và sau đó tôi mở AS với quyền quản trị và nó đã trở lại với cuộc sống!

Cảm ơn mọi người.

+0

Đối với người dùng * NIX, hãy xóa thư mục trong $ HOME/.gradle, sau đó khởi động lại Android studio. – alijandro

+0

Nếu bạn có x64 bit Intelli J thì bạn phải có x64 bit java với JAVA_HOME được đặt thành nó và _JAVA_OPTIONS -Djava.net.preferIPv4Stack = true vì một lý do nào đó có vấn đề với ipv6. sucks –

+0

Nó đủ loại bỏ thư mục cache bên trong .gradle và khởi động lại Android Studio với quyền quản trị. Dù sao, cảm ơn :) –

0

Đối với Windows 64 bit 7, tôi phải tải xuống jdk7 64bit ngoài việc xóa .gradle và khởi động Android studio làm quản trị viên. Tôi cũng đã đặt JAVA_HOME thành 64bit JDK và đặt JAVA_OPTIONS đến -Djava.net.preferIPv4Stack=true

Các vấn đề liên quan