Error occurs in configuring project:app when I am using any project in android studio

Issue

I’m facing weird issue on my android studio.

Whenever I’m running any project on my android studio I’m getting below error.

Error:A problem occurred configuring project ':app'
Could not download hamcrest-core.jar (org.hamcrest:hamcrest-core:1.3): No cached version available for offline mode

If anyone has idea or has faced this issue then please provide me solution so that how can I solve above this problem.

Solution

It’s Not depending on cache files but same project you are running on different devices and for that it will not working some time in your Laptop/PC.

but We need to refresh path of gradle by doing some changes like change path or directory from setting>gradle>gradle_path and also store old path at any location but safe place, because you will need it further.

Now refresh or rebuild your project it will gives error same as first you seen but when you set same path which was first when you change. now rebuild project again it will works properly.

Answered By – Akshay Donga

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published