We've got a strange behaviour in an Android project we inherited. The APK builds without error but the IDE keeps complaining about missing R class in imports.
We are using Android Studio 3.3. (wrong ! see edit at bottom)
After a little more digging, we found that the R.java file is actually generated but in build\generated\not_namespaced_r_class_sources
rather than the usual build\generated\sources
.
Does anyone already got this ? Even better, does anyone know how to fix this ?
Thanks folks!
Edit : I was actually using Android Studio 3.2…
In my case, I have to revert the version of android build tool:
classpath 'com.android.tools.build:gradle:3.2.1' // use this version instead of 3.3.0
In my case R.java always generates in build\generated\not_namespaced_r_class_sources
. You can try cleaning and rebuilding the product.
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