When I try to add a new resource file (ie. File>New>Android Resource File) "Source set: " is missing. Does anyone have any ideas why that could be?
I also had the same problem. I couldn't solve it. But you can still manually add a source set for different flavors.
In ur project view, right click on app >> New >> Folder >> Res Folder. Then choose a specific flavor in "Target Source Set".
You can see the details here in the link https://developer.android.com/studio/build/build-variants.html.
Android Studio will create a source set for you for that flavor. Try to add whatever resource file you want manually there.
Cheers!
I think it is by design -
When you add a new resource file by right clicking on the res
folder, you cannot select a source set; but if you add a new resource folder first, you will be able to select a source set.
After that, just right click on the new source set and add new resource files.
Looks like a bug. File > New > XML > Values (or Layout) Resource File does create a new resource file in the current build variant.
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