Android Studio has been grandle Build Running when importing a project

Source: Internet
Author: User

When developing an Android application using as, you often encounter Gradle build running running and even stuck, the workaround is as follows:

Method 1: (Pro-Test effective)

1. Create a new gradle.properties file in the c:\user\< user name >\.gradle directory and add a line inside it: org.gradle.daemon=true

2, Open as, in Settings set Gradle mode of operation for offline, such as:



So that we can solve the problem that has been running.

Method 2:

        Find path C:\Users\admin\.gradle\wrapper\dists, there is a Gradle version folder under this folder, Open after is a long name folder,
For example my C:\Users\admin\.gradle\wrapper\dists\gradle-2.4-all\6r4uqcc6ovnq6ac6s0txzcpc0     then Download the corresponding version of the gradle, the download of the compressed package directly into the name of a long folder, you do not need to extract


Method 3:

The Gradle agent needs to be configured in Android Studio, of course with goagent. After you open the Setting->gradle->gradle VM options:-dhttp.proxyhost=127.0.0.1-dhttp.proxyport=8087 Setup is successful, restart the Androidstudio , the speed will be very fast.
Method 4:
1) Go to the bin directory in the newly installed Android Studio directory. Locate the Idea.properties file and open it with a text editor.
2) Add a line at the end of the idea.properties file: Disable.android.first.run=true, and then save the file.
3) after shutting down Android studio and restarting, you can enter the interface.

Method: 5:

      may be Because some of the domestic anti-virus software disabled the Aapt.exe process caused. aapt is Android Asset Packaging Tool, under the Build-tools directory of the SDK. The tool can be viewed, created, updated in zip format with document attachments (Zip, jar, apk). You can also compile the resource files into binaries, although you may not have used the AAPT tool directly, but the build scripts and IDE plugins Use this tool to package the APK file to form an Android application.

Workaround:

There is a solution on the Internet, by extending the Aapt.exe start time to solve, in the system variable with "Slave_aapt_timeout", and set the value of 30, but also in the user variable to add "java_home" setting, But believe that as long as the JAVA or Android development people will set the "Java_home" it


Another way is to update Build-tools to the latest version

But these methods do not cure the symptoms.

The fundamental way to solve this is to let the antivirus software Trust all of Androidstudio's operations.

This will require you to use the anti-virus software used by your computer to add the trust program, the specific process depends on the use of different software

Add Studio.exe (32-bit) or Studio64.exe (64-bit) as the trusted program, and these two files are in the installation directory \ Bin folder of Androidstudio


Or simply set the entire Androidstudio installation directory folder to the Trust zone.

If the above steps are troublesome, then close or completely uninstall the anti-virus software to ... Simple, brutal, quick.

Method 6:

Download version of newer Android studio, the new version of this situation has a good improvement. I used 2.2.3, with almost no lag in the situation.

Android Studio has been grandle Build Running when importing a project

Related Article

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.