Search code examples
androidresourcesandroid-assetsshared-directory

How to share assets/resources/images between android projects


Let's say that I have 2 projects with that use the same images, stored in folder: /assets/pictures/

Is there a way I can share those images, without including them in both projects?


Solution

  • You can create a Library Project, and place the drawables, assets, there (see Managing Projects in the Android documentation

    Then reference this Library Project from your Application Projects.

    Make sure you're using Gradle/Android Studio though. Ant doesn't support assets in Library Projects (or at least didn't -- this might've changed).