After changing the gradle build file to use gradle build tool 0.8.+,
classpath \'com.android.tools.build:gradle:0.8.+\'
my Android studio
If you are on Windows check
C:\Users\YOUR_USER\.gradle\wrapper\dists
whether the gradle 1.10-all
is installed there or not inside the directory.
Android Studio downloads the whole distribution first time which is around 60 MB so it takes some time.
Check the distributionUrl in gradle/gradle-wrapper.properties and match the same in your dist directory if it is not available studio will download it. Distribution url will look like :
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
change it to whatever already installed will solve the problem.
Note : The directory name in dist and Zip name must same. Directory will be created while trying to download check whether the Zip is installed properly or not.
I have centos 7 64 bits installed on a virtualbox 5.0.16 virtual machine and gradle version 2.10 with Android Studio 2.0
The log file of gradle is located at $HOME/.gradle/daemon/2.10
Log file: daemon-<some number>.out.log
By inspecting this log file I found out that libz.so.1
was not found by aapt
.
Despite that command "locate libz.so.1" output was
/usr/lib64/libz.so
/usr/lib64/libz.so.1
/usr/lib64/libz.so.1.2.7
aapt
was not able to find it.
In order to solve the issue I had to execute
yum install zlib.i686
Once installed, Gradle started compiling. Good luck!
In my case, I used a multi-project setup and included two separate projects in settings.gradle
featuring some overlapping properties. I'm not sure which exact properties caused this, but they were most likely name-related. Basically, instead of throwing an exception ("duplicated [something] detected"), Gradle went into an endless loop. Replacing the duplicated properties helped.