I finally have a Test Case setup for Roboelectric but when I try to run it from Android Studio, get this error: Task 'testClasses' not found in project 'myExternalProjectName'
Error:Could not execute build using Gradle installation 'C:\Users\Mike.gradle\wrapper\dists\gradle-2.2.1-all\c64ydeuardnfqctvr1gm30w53\gradle-2.2.1'.
NOTES: 1. When I run from gradle cmd line(gradlew build) the tests run fine 2. I'M USING : org.robolectric:robolectric:3.0
I have modules in my project as AARs. How can I get around this issue?
To bypass the error, please add below code in build.gradle
tasks.register("testClasses")
This error happens when I rebuild the project and this is from Kotlin Multiplatform plugin/library. Still don't know the actual error cause.
EDIT: The tasks.register("testClasses")
line should go in the shared module's build.gradle.kts
file, within the kotlin { }
block.
I just had this error after setting up signing configs. File
-> invalidate caches
-> invalidate and restart
resolved the issue for me.
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