To get all drawables in an android app (using Kotlin) I call R.drawable::class.java.fields.
Since yesterday it worked perfectly fine but as I updated
classpath "com.android.tools.build:gradle:4.0.2"
to
classpath "com.android.tools.build:gradle:4.1.0"
it just returns an empty array (so no fields / drawables are found).
I changed anything other than this and also tried to clean the project, rebuild it, invalidate android studio caches and to downgrade and upgrade again, but nothing worked for me.
Why is that and is there a way to fix that weird bug?