I am trying to use junit 4.13 for unit testing in Android, then I am getting unresolved for it
a
Alexey Belkov [JB]
03/19/2020, 7:10 AM
Can you please share a sample project, or at least relevant build.gradle files to reproduce? Also, which Kotlin and IDE versions do you use?
i
itnoles
03/19/2020, 5:23 PM
in build.gradle,
Copy code
testImplementation 'junit:junit:4.13'
Kotlin 1.3.70
Latest Android Studio 4.0 Beta
a
Alexey Belkov [JB]
03/20/2020, 9:04 AM
Can't reproduce. I assume it's only unresolved in the IDE, not on Gradle build?
Some things that might help:
* "File | Invalidate caches and restart"
* delete .idea directory and reimport the project in the IDE
* Force Gradle to use the newer version of junit:
Copy code
configurations.all {
resolutionStrategy {
force 'junit:junit:4.13'
}
}