https://kotlinlang.org logo
j

Javier

12/24/2020, 2:01 AM
Someone is having problems related to run some Gradle tasks in Android Studio terminal, for example, having a failing test, run gradlew test, it fails, fix the test, run again gradlew test and it is like it is cached somewhere and it is reusing the previous code so it fails? I have to restart the IDE to fix this problem.
a

andylamax

12/24/2020, 4:57 AM
cleanTest before running tests try ./gradlew cleanTest test
j

Javier

12/24/2020, 8:49 AM
Really this problem is not only with tests, for example I can't apply spotless more than one time. With IntelliJ and the same project it is not happening. I think it is cached somewhere...
a

Adi

12/24/2020, 11:46 PM
Did you try a rebuild before running the tests? sometimes that can help
j

Javier

12/25/2020, 12:09 AM
Enable second and third options solves the problem, thank you for your help 🙂
3 Views