Import Android Studio project, compilation failed

Source: Internet
Author: User

Using Android studio to open Studio project, compile the error:

INFO-. Project. Gradleprojectresolver-gradle Project Resolve Error
Org.gradle.tooling.GradleConnectionException:Could not install Gradle distribution from ' https://services.gradle.org /distributions/gradle-2.10-all.zip '.

The computer itself has opened a VPN, but every time the compilation of the report this error, and then refer to the online solution, has resolved the error, now notes.

Although the VPN has been opened, why will the error?

Personal feeling should be in~/.gradle/wrapper/dists/  目录下有之前我不知道从那下载的 gradle-2.10-all.zip 包 (可能包有问题,所以一直装不上),因为gradl检测到已经有安装包了,所以没有从网上去重新下载它需要的那个包,所以即使开了vpn跟没开一样。

Then I removed the package from that directory, and Gradle should be the correct package to download from that URL. So the mistake disappeared. Day!

Here's how to find it online:

1:


It could be, the gradle-2.1 distribution specified by the wrapper is not downloaded properly. This is the root cause of the same problem in my environment.
Look in this directory:

Ls-l ~/.gradle/wrapper/dists/

In there you should find a gradle-2.1 folder. Delete It like so:

Rm-rf. gradle/wrapper/dists/gradle-2.1-bin/

Restart IntelliJ after that and it'll Restart the download from the beginning and hopefully work.

Original address: http://stackoverflow.com/questions/27467155/ Could-not-install-gradle-distribution-from-https-services-gradle-org-distribu

2:

1, Failed to import new Gradle project:could not install Gradle distribution from ' http://services.gradle.org/distribution S/gradle-1.6-bin.zip '.

Problem reason: The address of China connection Gradle is strong

Solution: modify Android Studio settings http proxy->auto-detect Proxy settings

Address: http://www.cnblogs.com/fourw/p/3198012.html

Import Android Studio project, compilation failed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.