I'm working with my first project in Android Studio 2.2. When I try to Sync the project with the Gradle, it shows an error error: package org.hamcrest does not exist
Therefore I had downloaded the hamcrest.jar library and added manually it under myfirstproject\app\libs
But, I got the following error when I add hamcrest.jar to my project.
Could not find method compile() for arguments(file collection) on object of type org.gradle.api.internal.artifacts.DSL.dependencies.DefaultDependencyHandler
This is my build.gradle file
-
Have I missed anything during the installation of my Android Studio?
Or should I need to add any libraries to the project?
If needed how it is to be done?