Issue
I have a few unit tests. Some are passing and some are failing. From yesterday, whatever changes I'm making to production code or these test codes, when I run the tests, it's reporting me the old results. I event changed one of my passing tests to this:
Assert.assertEquals(1, 2);
It's still passing!
I tried restarting Android studio, Invalidating its Caches, updating Android Studio to latest version, even restarting laptop, all with no luck.
Cleaning and rebuilding project sometimes works, but it's heavy and takes a few minutes. And for the next changes I make to code, the same old problem shows itself.
The problem seems to be that it's not making/updating Apk files. Because when I clean project, in the next run it complains about apk file not existing:
The APK file ***/app/build/outputs/apk/app-***-debug.apk does not exist on disk.
When I rebuild manually, it complains the same about Test apk file:
The APK file ***/app/build/outputs/apk/app-***-debug-androidTest-unaligned.apk does not exist on disk.
Environment information
Android Studio 2.1.2
Ubuntu 16.04 64bit
JRE 1.7.0 amd64
JVM OpenJDK 64bit
Gradle 2.10
Gradle plugin 2.1.2
Solution
Removing the Run configuration of the tests, solved the issue. Maybe it had some invalid configurations.
Answered By - Mousa
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.