Yea i have seen this, is there any way to access the file in shared module
01/16/2023, 5:05 PM
I found it necessary to symlink the Android resources directory to the common resources. For iOS I had to create a gradle task to copy the common resources to the framework or binary run path. I created this YouTrack issue when I initially found this need for common resources in tests. I've since had the same need in production modules and used the same workaround.
Ordinarily I'd expect to be able to add the common resources path to the platform src sets. But if you do this, the IDE will remove the src paths with the error: "Duplicate content roots detected", as the IDE doesn't support having the same source directory belong to multiple modules or source sets. Symlinks work as a workaround as the IDE sees the files as unique paths. This has some odd side effects, like those files showing up twice in search results though. For resources it's less of an issue than actually source code, which has additional side effects like the in-memory cached and on-disk states becoming conflicted when doing refactor or find/replace operations on the symlinked files.