./gradlew test
Task :compileTestJava FAILED FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileTestJava'.
> Could not find snakeyaml-1.27-android.jar (org.yaml:snakeyaml:1.27).
Searched in the following locations:
file:/Users/user/.m2/repository/org/yaml/snakeyaml/1.27/snakeyaml-1.27-android.jar
I get the above error with the following definition in my build.gradle file, trying to exclude from javafaker doesn't help either. What should I do here?
// faker
testImplementation('com.github.javafaker:javafaker:1.0.2')
testImplementation group: 'org.yaml', name: 'snakeyaml', version: '1.27'
In my case, I just deleted snakeyaml dependencies directory manually (*/.m2/repository/org/yaml/snakeyaml), it works.
// https://mvnrepository.com/artifact/com.github.javafaker/javafaker
implementation 'com.github.javafaker:javafaker:1.0.2'
Result: Could not find snakeyaml-1.30-android.jar (org.yaml:snakeyaml:1.30).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.30/snakeyaml-1.30-android.jar
Solution: Use dataFaker instead of javaFaker that will resolve all the issues, like so:
// https://mvnrepository.com/artifact/net.datafaker/datafaker
implementation 'net.datafaker:datafaker:1.5.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With