I got this error while creating new project in android studio,I have checked the library and have hamcrest-core-1.3.jar file .Please help me
Error:A problem occurred configuring project ':app'.
> Could not download hamcrest-core.jar (org.hamcrest:hamcrest-core:1.3)
> Could not get resource 'https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar'.
> Could not GET 'https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar'.
> jcenter.bintray.com
the error is not because of hamcrest-core-1.3.jar file. it seems gradle cannot connect to jcenter and download the junit.jar . So, make sure of your internet connection and rebuild your project. normally gradle downloads all necessary jars. if it dosent try to update your build tools.
Try this on your build.gradle Module:app
configurations.all {
resolutionStrategy {
force 'org.hamcrest:hamcrest-core:1.3'
}}
Reference: https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With