How to add a linked source folder in Android Studio?

前端 未结 6 1825
野的像风
野的像风 2020-11-28 05:38

In Eclipse I can add a source folder to my android project as a \"linked source folder\". How do I achieve the same thing in Android Studio?

Or is it possible to ad

6条回答
  •  孤独总比滥情好
    2020-11-28 06:13

    While sourceSets allows you to include entire directory structures, there's no way to exclude parts of it in Android Studio (as of version 1.2), as described here: Android Studio Exclude Class from build?

    Until Android Studio gets updated to support include/exclude directives for Android sources, Symlinks work quite well. If you're using Windows, native tools such as junction or mklink can accomplish the equivalent of Un*x symlinks. CygWin can also create these with a little coersion. See: Git Symlinks in Windows and How to make symbolic link with cygwin in Windows 7

提交回复
热议问题