when importing someone else’s project in Android Studio, the project Failed to resolve: junit:junit:4.12:
solution:
1, direct comment out, this is actually a way to avoid mistakes;
2. Add maven:
to the build.gradle file under E:\android\app (project file directory)allprojects {
repositories {
google()
jcenter()
maven { url 'http://repo1.maven.org/maven2' }
}
}
or junit was deleted in file — Project Structure and then added again:
if it still doesn’t work, it’s best to change the version to match the current SDK for good.
Read More:
- [Solved] Failed to resolve org.junit.platform:junit-platform-launcher:1.7.2
- Failed to resolve org.junit.platform:junit-platform-launcher:1.7.0
- org.junit.platform.commons.JUnitException: TestEngine with ID ‘junit-vintage‘ failed to discover tes
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- import org.junit.Test And @ test error reporting — solutions
- About Android studio error: (26,13) failed to resolve: com.android.support : appcompat-v7:27. + error
- Android studio failed to resolve: com.github.CymChad :BaseRecyclerViewAdap terHelper:2.9.46
- Spring configuration transaction, JUnit unit test error “failed to load ApplicationContext”
- Install of Android studio_ FAILED_ OLDER_ Solutions to SDK
- Troubleshooting of Jenkins upgrade to 2.42 JUnit test report
- Failed to resolve: com.android.support:appcompat-v7:25.3.0
- How to Fix “junit.framework.Comparison Failure Expected: but was”
- Spring integrates JUnit configuration
- The usage of Java JUnit unit test and the solution of initialization error
- java.lang.NoClassDefFoundError: org/junit/platform/launcher/TestExecutionListener
- Junit4 unit test reports an error invalid project specified
- Android Studio could not resolve resource
- Android Studio | Failed to find target with hash string ‘android-26’ in: D:\Android\sdk
- Solutions to errors in virtual machine running in Android studio
- Failed to resolve: com.android.support:appcompat-v7:27.