https://kotlinlang.org logo
#random
Title
# random
d

Davide Giuseppe Farella

01/18/2023, 7:00 PM
Hello people. Having a bizarre issue with an Android project. I regularly worked till yesterday, but today I checked out
main
( from production code, correctly working on CI and on my team’s machines ), I added an empty class and an empty test, and when I run unit tests I have
Unresolved reference
on a test class in another module, where a simple extension function is imported from another Android module. The IDE doesn’t report any issue, just when running tests ( both from Gradle UI and CLI ). So I reverted my changes, and they ran correctly. Whenever I change something, even only adding a simple
private val a = 0
in any class or changing the name of a function parameter, the tests’ build fails with the same error. That doesn’t happen by changing a value, like
123
->
456
or
"hello"
->
"hello 1"
The only thing I did before is installing AS Giraffe, but I got the same issue also on Flamingo and EE, even on IntelliJ. Tried invalidating the cache and the whole
Repair IDE
flow. Nothing helped 🙄 Any idea? Thank you 🙏
This is the incriminated function, which has been reported as
Unresolved reference
in the test class. If I add a
-2
variant and import that instead in that test, everything runs smoothly 😅
10 Views