I am using Android Studio 0.4.2. Opened project from a friend who is using 0.3.2. Tried to compile but got exception.
Execution failed for task \':JuiceTV:d
As of Android Gradle 1.0 this can happen a few ways:
If you only use Maven repos you can run into this issue if two different artifacts include the same class file.
The Mockito-all library, for instance, includes Hamcrest and you would therefore cause this error if you included both dependencies in a build.
Note, if you have minification turned on you won't see the error until you start using Hamcrest. The way to resolve this is to use a version of the library that isn't including other package's classes (Mockito-core in this case).
If you declare a local jar/aar dependency (compile 'com.some.library:some-artiface-version_number@aar') that is already being included by other maven-based dependencies.
In this situation your local declaration doesn't get de-duped with the Maven one because the pom information isn't available. You would typically create a local, file-based maven repo for the aar to get around this.
In either case, a project clean is required to pickup the changes.