The problem is exactly as said in the title. Android Studio is putting Hilt and Glide generated files in regular java folder instead of java(generated) leading to a lot of generated files and packages next to source files.
Problem occurs only on 1.8 Kotlin version. Everything prior to this version works fine. I believe that the root of the problem is kapt, using annotationProcessor leads to the expected result
Go to the Android Studio Settings and open this path like so:
Build, Execution, Deployment > Build Tools > Gradle
Change the Gradle JDK
to the 11
version if it is 17
and press OK.
Roll back any changes in files that define the JDK version like misc.xml.
Clean your project using Build
menu in the toolbar and Clean Project
item and rebuild your project. It is also a good idea to Invalidate Caches
and restart before build.
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