Search code examples
androidjunitandroid-testingandroidxandroid-junit

"Failed to resolve: org.junit:junit:4.12" with AndroidX Test JUnit


When I try to add dependency on AndroidX Test JUnit 1.0.0-beta01: androidTestImplementation androidx.test.ext:junit:1.0.0-beta01, Gradle Sync fails with the following error:

Failed to resolve: org.junit:junit:4.12

All manipulations with adding org.junit dependency manually didn't help either.


Solution

  • The above issue has been fixed in 1.0.0-beta02

    'androidTestImplementation "androidx.test.ext:junit:1.0.0-beta02'