- go to the android studio libs directory
(C:\Program Files\Android\Android Studio\lib)
- find
junit-4.12.jar file
- copy the jar file to your project libs folder
(myproject\app\libs)
- open android studio and delete(comment) this line
(testCompile 'junit:junit:4.12') in build.gradle file
in android studio open (libs) directory and right click the jar file then choose add as a library
just build your project (for more info see below picture)
solved Error:(23, 17) Failed to resolve: junit:junit:4.12