Gradle sync error: can not resolve junit:junit4.12

(Mohammad yahya esteghamat) #1


I using android studio2.0 and gradle 2.10 with win 10.
When i want create project ,gradle given this error:
gradle project sync completed with some error.
Error(23,17) failed to resolve junit:junit 4.12

I do very ways to fix this error.but do not repair.
Only for one of the my project this repaired but for other no.
Please help me…

(Sterling Greene) #2

It says “Disable offline mode and Sync”. You might have offline mode enabled, which will prevent Gradle from downloading external dependencies.

(Mohammad yahya esteghamat) #3

Hi @sterling
Thank you for your answer.
But when i disable offline work then gradle is online and it can download from internet.but it take time and after complete process it given same error for other new project too!!!