简体   繁体   中英

Android studio 2.3 building new project for first time, taking too long to build

I have recently installed android studio 2.3.3 on my ubuntu 16.04, and even installed oracle JDK. Earlier I used to have android studio on ubuntu and it used to work fine. But my hard disk got changed and now I have installed android studio on my ubuntu and downloaded all the necessary files in SDK manager, on creating new project it keeps on building the project, and doesn't even show any text on the loading bar.

Upon searching the issue over the net I could only find topic of forever gradle build only on imported projects, but I am facing this on creating new projects. Also i have checked the option for gradle to work offline and set proxy to no proxy, but I am still facing this problem...

Also I live in the area with slow Internet so could this be the problem

Update:Problem was solved, I had to wait for sometime so that android studio downloads gradle files for first time building a project

The internet speed plays a huge factor with that.

Wait for the first build to end, or use a different internet source. (Mobile hotspot if the speed is faster than the landline). Usually this issue doesn't reoccur after the first build.

Yeah Internet speed is a serious issue, well when you have enabled offline mode and disabled proxy as well, then this issue should be gone.

There are few more tricks those will help you:

  1. Find the "gradle.properties" file in your project and add these lines into it.

    org.gradle.parallel=true

    org.gradle.daemon=true

For details check this link:

Building and running app via Gradle and Android Studio is slower than via Eclipse

  1. Enable "Instant Run" in Android Studio.

Settings → Build, Execution, Deployment → Instant Run → Enable Instant Run.

Hope it will help you.

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