简体   繁体   中英

Error:Could not run build action using Gradle installation 'C:\Program Files\Android\Android Studio1\gradle\gradle-2.2.1'

我刚刚在Windows 8.1 64位上安装了android studio 1.0 RC2,但是当我尝试创建一个新项目时,它说错误:无法使用Gradle安装'C:\\ Program Files \\ Android \\ Android Studio1 \\ gradle \\ gradle-运行构建操作2.2.1'。,请帮我解决这个问题,我真的陷入了这个困境

Try this:

1) File -> Invalidate caches / Restart

2) Shutdown Android Studio

3) Remove .gradle folder in the user home directory

4) Restart Android Studio let it download all the Gradle stuff it needs

5) Gradle build success !

6) Rebuild project.... success !

We have two famous way for this problem:

1- update the gradle:

step 1:

Get latest version supported by Android Studio from:

https://services.gradle.org/distributions

step 2:

Extract the gradle file and install to dists folder(gradle folder): default location is: C:\\Users[username]\\gradle\\wrapper\\dists

step 3:

Open Android Studio: File/Settings/Gradle/Service directory path: (Change to folder you set above) and Click ok.

Status on bottom should indicate it's busy & error should be fixed.

step 4:

restart Android Studio

2- Delete the .gradle folder:

default location is:

C:\\Users[username]\\gradle\\wrapper\\dists

after that open Android Studio and make a new project (might need to reastart).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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