https://kotlinlang.org logo
#kapt
Title
# kapt
g

grandstaish

06/16/2020, 7:58 PM
Does anyone know why some generated files wouldn’t show up in the
generated/source/kapt
folder, even though they are being generated? (They’re in the AAR and final APK of my app)
For context, I’m using Dagger, and many of my Factories can’t be resolved when I look at the source. E.g.:
It’s not stopping me in any way, it just bothers me a lot seeing all these errors 😬
t

tddmonkey

06/19/2020, 5:25 PM
Do you mean they just don’t resolve in IDEA?
g

grandstaish

06/19/2020, 8:47 PM
Yea that's what I mean. The app compiles fine, and the classes exist in the final APK, but they show up as missing in the IDE. And if you look at the
generated
folder, they're missing there too
t

tddmonkey

06/19/2020, 9:33 PM
could be worth doing a
find
to see where they are and then ensuring that dir is added to your sourcesets. IIRC it won’t happen by default
g

grandstaish

06/19/2020, 9:50 PM
True, I’ll try that tomorrow 🙏 . The strange thing is that other kapt-generated files were in that directory (files from dagger also!)
Specifically just
@Inject
factories were missing
t

tddmonkey

06/19/2020, 9:55 PM
Well if it compiles they gotta be somewhere!
🕵️‍♂️ 1
3 Views