Android Studio gradle:resolvedependencies ': app:_debugcompile ' problem solving record

Source: Internet
Author: User
Tags jcenter

Problem Description:

The first time you use Androidstudio to open an already existing Androidstudio project, stuck in the gradle:resolvedependencies ': App_debugcompile ' step, Even if you enter the Androidstudio interface, you cannot download Gradle dependencies properly and cannot compile and run.

1. First make sure that Gradle dependencies are declared in Build.gradle under the app, not in the Build.gradle file under the global project, which is common sense to use Gradle to manage Androidstudio projects.

2. Verify that the HTTP proxy for Androidstudio is set up correctly. I am using the SHADOWSOCKSX Agent, in the HTTP proxy set 127.0.0.1 port 1080,connect test google.com and android.com can be connected properly.

If you do not have the above two requirements, please first to see how the results, and then look down.

Resolution process:

1. First look at the current Androidstudio Gradle version, mine is 2.4, then go to download Gradle-2.4-all.zip, extract the Gradle-2.4-all folder. Copy the Gradle-2.4-all folder to the Wrapper/dists path under the default Gradle path. Under Mac is/users/nameofuser/.gradle/wrapper/dists

This allows you to select items in the Androidstudio window to enter the project interface. There is no card in gradle:resolvedependencies ': app_debugcompile ' step this step. I think it was androidstudio that detected the local Gradle file and then selected the offline mode startup project.

But this time compile the project error, Gradle dependency cannot download, prompts you to turn off offline mode. It was only then that the first step was to use the offline version instead of checking the Gradle online at each boot and compile time. However, for the first time, Gradle relies on the local is not.

2. First switch to online mode, that is, select Use default Gradle wrapper (recommended) in the Gradle settings and modify the Build.gradle file under the global project

allprojects{

repositories{

Jcenter ()

}

}

In Jcenter () for Mavencental (), use maven to download dependencies. After setting up the rebuild, download depends on success.

Android Studio gradle:resolvedependencies ': app:_debugcompile ' problem solving record

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.